diff options
author | Brad King <brad.king@kitware.com> | 2010-12-09 17:36:59 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-09 17:51:47 -0500 |
commit | 83892c4a1170bf68a1e5da305899a23eb69a7500 (patch) | |
tree | 91df9774d9041e5d5d4c5dbf5a136c284c8107b1 /Modules/CMakeFortranInformation.cmake | |
parent | fe3f878f15c498dcd9583bfd17b1ee11cbc5249d (diff) | |
download | cmake-83892c4a1170bf68a1e5da305899a23eb69a7500.tar.gz |
Allow Fortran platform files to set empty values
Teach CMakeFortranInformation to use default flags only for variables
that have not been set at all, rather then not set or empty. This will
allow platform or compiler-specific information files to set empty
values without getting the defaults.
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index f6a52c6eb2..1e9b4e09b9 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -67,29 +67,29 @@ SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1) # Create a set of shared library variable specific to Fortran # For 90% of the systems, these are the same flags as the C versions # so if these are not set just copy the flags from the c version -IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) +ENDIF() -IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_Fortran_FLAGS) SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) +ENDIF() IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) -ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) +ENDIF() -IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) +ENDIF() -IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) +ENDIF() -IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) -ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) +ENDIF() IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG) SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG}) @@ -100,25 +100,25 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG) ENDIF() # repeat for modules -IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) +IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) +ENDIF() -IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) +IF(NOT DEFINED CMAKE_SHARED_MODULE_Fortran_FLAGS) SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) +ENDIF() -IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) +IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG}) -ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) +ENDIF() -IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) +IF(NOT DEFINED CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP}) -ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) +ENDIF() -IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) +IF(NOT DEFINED CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG}) -ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) +ENDIF() IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH) SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH}) |