summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-09 22:36:59 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-09 22:51:47 (GMT)
commit83892c4a1170bf68a1e5da305899a23eb69a7500 (patch)
tree91df9774d9041e5d5d4c5dbf5a136c284c8107b1 /Modules
parentfe3f878f15c498dcd9583bfd17b1ee11cbc5249d (diff)
downloadCMake-83892c4a1170bf68a1e5da305899a23eb69a7500.zip
CMake-83892c4a1170bf68a1e5da305899a23eb69a7500.tar.gz
CMake-83892c4a1170bf68a1e5da305899a23eb69a7500.tar.bz2
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')
-rw-r--r--Modules/CMakeFortranInformation.cmake42
1 files changed, 21 insertions, 21 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index f6a52c6..1e9b4e0 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})