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 OPTIMIZATION ?= DEFENSIVE
ifeq "$(F90)" "ifort" ifeq "$(F90)" "ifort"
ifeq "$(OPTIMIZATION)" "OFF"
ARCHIVE_COMMAND :=ar
else
ARCHIVE_COMMAND :=xiar ARCHIVE_COMMAND :=xiar
endif
else else
ARCHIVE_COMMAND :=ar ARCHIVE_COMMAND :=ar
endif endif
@ -192,10 +196,10 @@ COMPILE_OPTIONS_gfortran :=-xf95-cpp-input\
-Wunderflow\ -Wunderflow\
-Wswitch\ -Wswitch\
-Wstrict-overflow\ -Wstrict-overflow\
-Wextra\
-Wattributes\ -Wattributes\
-Wunsafe-loop-optimizations\ -Wunsafe-loop-optimizations\
-Wunused -Wunused\
-Wextra
#-xf95-cpp-input: preprocessor #-xf95-cpp-input: preprocessor
#-ffree-line-length-132: restrict line length to the standard 132 characters #-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. #-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 #-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. #-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 #-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 #-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)
# enumeration. (The presence of a "default" label prevents this warning.) "case" labels outside the enumeration range also provoke #-Wstrict-overflow:
# warnings when this option is used (even if there is a "default" label) #-Wattributes: warn about inappropriate attribute usage
#-Wstrict-overflow #-Wunsafe-loop-optimizations: warn if the loop cannot be optimized due to nontrivial assumptions.
#-Wattributes Warn about inappropriate attribute usage #-Wunused:
# -Wunsafe-loop-optimizations Warn if the loop cannot be optimized due to nontrivial assumptions. # -value:
# -parameter: find usused variables with "parameter" attribute
#-Wextra:
################################################################################################### ###################################################################################################
#OPTIONS FOR GFORTRAN 4.6 #OPTIONS FOR GFORTRAN 4.6
#-Wsuggest-attribute=const: #-Wsuggest-attribute=const: