summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-02-19 13:23:31 (GMT)
committerBrad King <brad.king@kitware.com>2010-02-19 13:23:31 (GMT)
commit4eba05de42587e3efeb2b272569f92b238818238 (patch)
tree949b9b4331b46c66d5944eb5bb499d2fc2a81382 /Modules/Platform
parent2eeccbe2277d4a3f4eb2d21c256fcae372a0bbbc (diff)
downloadCMake-4eba05de42587e3efeb2b272569f92b238818238.zip
CMake-4eba05de42587e3efeb2b272569f92b238818238.tar.gz
CMake-4eba05de42587e3efeb2b272569f92b238818238.tar.bz2
Suppress GNU flag -fPIC on Windows
Commit "Modernize GNU compiler info on Windows" (2009-12-02) reorganized GNU flags on Windows but let -fPIC slip through for compilation of objects in shared libraries. While this flag is valid on most GNU compiler platforms we need to suppress it in Windows-GNU.cmake just as we already do in CYGWIN-GNU.cmake.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-GNU.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index e5f86d9..6d84940 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -67,6 +67,8 @@ macro(__windows_compiler_gnu lang)
endforeach(type)
endif()
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows
+
# Binary link rules.
set(CMAKE_${lang}_CREATE_SHARED_MODULE
"<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_MODULE_${lang}_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES>")