disabled multi file optimization when setting OPTIMIZATION=OFF and improved comments on compiler switches

This commit is contained in:
Martin Diehl 2012-02-24 13:38:15 +00:00
parent fc40291f38
commit f2ee67d03d
1 changed files with 34 additions and 30 deletions

View File

@ -46,7 +46,11 @@ OPENMP ?= ON
OPTIMIZATION ?= DEFENSIVE
ifeq "$(F90)" "ifort"
ifeq "$(OPTIMIZATION)" "OFF"
ARCHIVE_COMMAND :=ar
else
ARCHIVE_COMMAND :=xiar
endif
else
ARCHIVE_COMMAND :=ar
endif
@ -192,10 +196,10 @@ COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
-Wunderflow\
-Wswitch\
-Wstrict-overflow\
-Wextra\
-Wattributes\
-Wunsafe-loop-optimizations\
-Wunused
-Wunused\
-Wextra
#-xf95-cpp-input: preprocessor
#-ffree-line-length-132: restrict line length to the standard 132 characters
@ -211,15 +215,15 @@ COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
#-Waliasing: warn about possible aliasing of dummy arguments. Specifically, it warns if the same actual argument is associated with a dummy argument with "INTENT(IN)" and a dummy argument with "INTENT(OUT)" in a call with an explicit interface.
#-Wconversion: warn about implicit conversions between different type
#-Wsurprising: warn when "suspicious" code constructs are encountered. While technically legal these usually indicate that an error has been made.
#-Wunused-value:
#-Wunused-parameter: find usused variables with "parameter" attribute
#-Wunderflow: produce a warning when numerical constant expressions are encountered, which yield an UNDERFLOW during compilation
#-Wswitch: warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of the named codes of that
# enumeration. (The presence of a "default" label prevents this warning.) "case" labels outside the enumeration range also provoke
# warnings when this option is used (even if there is a "default" label)
#-Wstrict-overflow
#-Wattributes Warn about inappropriate attribute usage
# -Wunsafe-loop-optimizations Warn if the loop cannot be optimized due to nontrivial assumptions.
#-Wswitch: warn whenever a "switch" statement has an index of enumerated type and lacks a "case" for one or more of the named codes of that enumeration. (The presence of a "default" label prevents this warning.) "case" labels outside the enumeration range also provokewarnings when this option is used (even if there is a "default" label)
#-Wstrict-overflow:
#-Wattributes: warn about inappropriate attribute usage
#-Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
#-Wunused:
# -value:
# -parameter: find usused variables with "parameter" attribute
#-Wextra:
###################################################################################################
#OPTIONS FOR GFORTRAN 4.6
#-Wsuggest-attribute=const: