diff options
Diffstat (limited to 'Modules/CMakeCXXInformation.cmake')
-rw-r--r-- | Modules/CMakeCXXInformation.cmake | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 8d05933..4e03bf3 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -72,10 +72,6 @@ IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS) SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS) -IF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS) - SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS ${CMAKE_SHARED_MODULE_LINK_C_FLAGS}) -ENDIF(NOT CMAKE_SHARED_MODULE_LINK_CXX_FLAGS) - IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG) SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG}) ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG) @@ -84,6 +80,18 @@ IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}) ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) +# Initialize CXX link type selection flags from C versions. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS + ${CMAKE_${type}_LINK_STATIC_C_FLAGS}) + ENDIF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS) + IF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS) + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS + ${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS}) + ENDIF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS) +ENDFOREACH(type) + # add the flags to the cache based # on the initial values computed in the platform/*.cmake files # use _INIT variables so that this only happens the first time |