summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranInformation.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-12-02 20:17:53 (GMT)
committerBrad King <brad.king@kitware.com>2009-12-02 20:17:53 (GMT)
commit4d72006bd6ba8c471236a9732ae4fd9cc9e90cfa (patch)
tree3665c5144e0d62b4c9150064babc6bf322802447 /Modules/CMakeFortranInformation.cmake
parent9daa4a6c3f3106adf02c9f8bc587fa8096a56b3b (diff)
downloadCMake-4d72006bd6ba8c471236a9732ae4fd9cc9e90cfa.zip
CMake-4d72006bd6ba8c471236a9732ae4fd9cc9e90cfa.tar.gz
CMake-4d72006bd6ba8c471236a9732ae4fd9cc9e90cfa.tar.bz2
Reduce duplication in Platform/<os>.cmake files
Several platform-wide linker flag variables are defined in Modules/Platform/<os>.cmake files for C and then copied by the Modules/CMake<lang>Information.cmake file for each language. We now use this approach for the variables CMAKE_EXE_EXPORTS_${lang}_FLAG CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS to avoid duplication for multiple languages in each platform file.
Diffstat (limited to 'Modules/CMakeFortranInformation.cmake')
-rw-r--r--Modules/CMakeFortranInformation.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index c57c959..97a5e7e 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -89,6 +89,14 @@ IF(NOT 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)
+IF(NOT DEFINED CMAKE_EXE_EXPORTS_Fortran_FLAG)
+ SET(CMAKE_EXE_EXPORTS_Fortran_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
+ENDIF()
+
+IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG)
+ SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
+ENDIF()
+
# repeat for modules
IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS)
SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})