diff --git a/Modules/CMakeDefaultMakeRuleVariables.cmake b/Modules/CMakeDefaultMakeRuleVariables.cmake index 666c81d22..f7e62a828 100644 --- a/Modules/CMakeDefaultMakeRuleVariables.cmake +++ b/Modules/CMakeDefaultMakeRuleVariables.cmake @@ -42,7 +42,7 @@ # create a shared C++ library IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY) SET(CMAKE_CXX_CREATE_SHARED_LIBRARY - " -o ") + " -o ") ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY) # create a c++ shared module copy the shared library rule by default @@ -53,7 +53,7 @@ ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE) # create a C shared library IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY) SET(CMAKE_C_CREATE_SHARED_LIBRARY - " -o ") + " -o ") ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY) # create a C shared module just copy the shared library rule diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake index 4dd273d1f..ec7950a1c 100644 --- a/Modules/Platform/CYGWIN.cmake +++ b/Modules/Platform/CYGWIN.cmake @@ -7,3 +7,4 @@ SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make ) +SET(CMAKE_SHARED_LIBRARY_C_FLAGS -DTestPIC) \ No newline at end of file diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 164ce5e6c..a31fc2b7a 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -672,6 +672,12 @@ static RuleVariables ruleReplaceVars[] = {"", "CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS"}, {"", "CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS"}, {"", "CMAKE_CXX_LINK_FLAGS"}, + {"", "CMAKE_SHARED_MODULE_C_FLAGS"}, + {"", "CMAKE_SHARED_MODULE_CXX_FLAGS"}, + {"", "CMAKE_SHARED_LIBRARY_C_FLAGS"}, + {"", "CMAKE_SHARED_LIBRARY_CXX_FLAGS"}, + {"", "CMAKE_CXX_LINK_FLAGS"}, + {"", "CMAKE_CXX_LINK_FLAGS"}, {"", "CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS"}, {"", "CMAKE_SHARED_MODULE_CREATE_C_FLAGS"}, diff --git a/Tests/SystemInformation/SystemInformation.in b/Tests/SystemInformation/SystemInformation.in index 8c3a5c773..85cbcf1d3 100644 --- a/Tests/SystemInformation/SystemInformation.in +++ b/Tests/SystemInformation/SystemInformation.in @@ -26,7 +26,7 @@ CMAKE_SHARED_LIBRARY_RUNTIME_FLAG == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG}" CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP}" // C shared module flags -CMAKE_SHARED_MODULE_C_FLAGS == "${CMAKE_SHARED_MODULE_C_FLAGS }" +CMAKE_SHARED_MODULE_C_FLAGS == "${CMAKE_SHARED_MODULE_C_FLAGS}" CMAKE_SHARED_MODULE_CREATE_C_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}" CMAKE_SHARED_MODULE_LINK_FLAGS == "${CMAKE_SHARED_MODULE_LINK_FLAGS}" CMAKE_SHARED_MODULE_RUNTIME_FLAG == "${CMAKE_SHARED_MODULE_RUNTIME_FLAG}"