diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 5e09eab1e..9dc9cbd30 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -108,6 +108,10 @@ IF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE) SET(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE}) ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE) +IF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL) + SET(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL}) +ENDIF(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL) + IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS) SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS) diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 9c824096f..d962f4cb5 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -82,6 +82,10 @@ IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE) SET(CMAKE_Fortran_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE}) ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_PIE) +IF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL) + SET(CMAKE_Fortran_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL}) +ENDIF(NOT CMAKE_Fortran_COMPILE_OPTIONS_DLL) + # 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 diff --git a/Modules/Compiler/SCO.cmake b/Modules/Compiler/SCO.cmake index ef2f64be2..f673c8f80 100644 --- a/Modules/Compiler/SCO.cmake +++ b/Modules/Compiler/SCO.cmake @@ -22,6 +22,7 @@ macro(__compiler_sco lang) # Feature flags. set(CMAKE_${lang}_COMPILE_OPTIONS_PIC -Kpic) set(CMAKE_${lang}_COMPILE_OPTIONS_PIE -Kpie) + set(CMAKE_${lang}_COMPILE_OPTIONS_DLL -belf) set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-Kpic -belf") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-belf -Wl,-Bexport") endmacro() diff --git a/Modules/Platform/Windows-Embarcadero.cmake b/Modules/Platform/Windows-Embarcadero.cmake index 87b3767cd..62e8eb704 100644 --- a/Modules/Platform/Windows-Embarcadero.cmake +++ b/Modules/Platform/Windows-Embarcadero.cmake @@ -76,7 +76,8 @@ SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_R macro(__embarcadero_language lang) - set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") + set(CMAKE_${lang}_COMPILE_OPTIONS_DLL "${_tD}") # Note: This variable is a ';' separated list + set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "${_tD}") # ... while this is a space separated string. # compile a source file into an object file # place outside the response file because Borland refuses diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake index e1140df84..14b3b81d5 100644 --- a/Modules/Platform/Windows-wcl386.cmake +++ b/Modules/Platform/Windows-wcl386.cmake @@ -20,7 +20,8 @@ SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT "debug all" ) SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" ) SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT "debug all" ) -set (CMAKE_SHARED_LIBRARY_C_FLAGS "-bd" ) +set(CMAKE_C_COMPILE_OPTIONS_DLL "-bd") # Note: This variable is a ';' separated list +set(CMAKE_SHARED_LIBRARY_C_FLAGS "-bd") # ... while this is a space separated string. SET(CMAKE_RC_COMPILER "rc" ) diff --git a/Tests/SystemInformation/SystemInformation.in b/Tests/SystemInformation/SystemInformation.in index 8840bbf77..ecbc05408 100644 --- a/Tests/SystemInformation/SystemInformation.in +++ b/Tests/SystemInformation/SystemInformation.in @@ -32,6 +32,7 @@ CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATIC_ CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS}" CMAKE_C_COMPILE_OPTIONS_PIC == "${CMAKE_C_COMPILE_OPTIONS_PIC}" CMAKE_C_COMPILE_OPTIONS_PIE == "${CMAKE_C_COMPILE_OPTIONS_PIE}" +CMAKE_C_COMPILE_OPTIONS_DLL == "${CMAKE_C_COMPILE_OPTIONS_DLL}" // C shared module flags CMAKE_SHARED_MODULE_C_FLAGS == "${CMAKE_SHARED_MODULE_C_FLAGS}" @@ -53,6 +54,7 @@ CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATI CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS}" CMAKE_CXX_COMPILE_OPTIONS_PIC == "${CMAKE_CXX_COMPILE_OPTIONS_PIC}" CMAKE_CXX_COMPILE_OPTIONS_PIE == "${CMAKE_CXX_COMPILE_OPTIONS_PIE}" +CMAKE_CXX_COMPILE_OPTIONS_DLL == "${CMAKE_CXX_COMPILE_OPTIONS_DLL}" // CXX shared module flags CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS}"