summaryrefslogtreecommitdiff
path: root/Modules/CMakeFortranInformation.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-21 13:04:15 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-21 13:04:15 -0400
commitaa10b4e33cd4a0c304f3cd3ffd5f0f382a6b6178 (patch)
tree9f65728434ce0f45debaa6b5dcd0549574854663 /Modules/CMakeFortranInformation.cmake
parent2eb3653d79a523b1745bd6fc7f3abc7bd0738e06 (diff)
downloadcmake-aa10b4e33cd4a0c304f3cd3ffd5f0f382a6b6178.tar.gz
ENH: fix init flags getting stuffed into the compile line by force.
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r--Modules/CMakeFortranInformation.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 93d58b8fff..cfde0e55bd 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -106,13 +106,13 @@ ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran)
SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.")
-SET (CMAKE_Fortran_FLAGS "$ENV{FFLAGS}" CACHE STRING
+SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFFLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
+# avoid just having a space as the initial value for the cache
+IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
+ SET(CMAKE_Fortran_FLAGS_INIT)
+ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ")
+SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING
"Flags for Fortran compiler.")
-IF (CMAKE_Fortran_FLAGS_INIT)
- SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_INIT}")
-ENDIF (CMAKE_Fortran_FLAGS_INIT)
-
-
INCLUDE(CMakeCommonLanguageInclude)