From 4eba05de42587e3efeb2b272569f92b238818238 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 19 Feb 2010 08:23:31 -0500 Subject: [PATCH] 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. --- Modules/Platform/Windows-GNU.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index e5f86d9f3..6d8494073 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 " -o ${CMAKE_GNULD_IMAGE_VERSION} ")