diff options
author | David Cole <david.cole@kitware.com> | 2012-02-07 20:35:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-02-07 20:35:11 (GMT) |
commit | 986981ea03cac860c0128214144b97f18979a1ae (patch) | |
tree | cc702276a5c843549895b3dd07b6e9865e2f79c2 /Modules | |
parent | 43b463cdfc8f1e2e595ab9cf0feec89b4b782e0b (diff) | |
parent | 749584509ee3155bb87e56a08ee538e4100a59d8 (diff) | |
download | CMake-986981ea03cac860c0128214144b97f18979a1ae.zip CMake-986981ea03cac860c0128214144b97f18979a1ae.tar.gz CMake-986981ea03cac860c0128214144b97f18979a1ae.tar.bz2 |
Merge topic 'lang-enable-order-issue-12929'
7495845 Fix CXX/Fortran MODULE flags when enabled before C (#12929)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 14 | ||||
-rw-r--r-- | Modules/CMakeFortranInformation.cmake | 8 |
2 files changed, 16 insertions, 6 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index b97a69c..25abb8c 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -93,12 +93,6 @@ IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) ENDIF() -# for most systems a module is the same as a shared library -# so unless the variable CMAKE_MODULE_EXISTS is set just -# copy the values from the LIBRARY variables -IF(NOT CMAKE_MODULE_EXISTS) - SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) -ENDIF(NOT CMAKE_MODULE_EXISTS) # Create a set of shared library variable specific to C++ # 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 @@ -158,6 +152,14 @@ IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX) SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C}) ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX) +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +IF(NOT CMAKE_MODULE_EXISTS) + SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) + SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}) +ENDIF(NOT CMAKE_MODULE_EXISTS) + # repeat for modules IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS) SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index aed1fd2..76cf34e 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -109,6 +109,14 @@ IF(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG) SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG}) ENDIF() +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +IF(NOT CMAKE_MODULE_EXISTS) + SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_Fortran_FLAGS}) + SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS}) +ENDIF(NOT CMAKE_MODULE_EXISTS) + # repeat for modules IF(NOT DEFINED CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) |