Adding logic to CMake for -fPIE and -fPIC
Brad King
brad.king at kitware.com
Thu May 3 16:59:16 UTC 2012
On 5/3/2012 12:02 PM, Stephen Kelly wrote:
> * Make set(CMAKE_POSITION_INDEPENDENT_BINARIES True) set the appropriate flags.
This is the right choice IMO, though the variable should just
initialize a "POSITION_INDEPENDENT" target property. The target
property would then map to the right flag. You'll need to factor
out and generalize the CMAKE_SHARED_LIBRARY_${lang}_FLAGS platform
information variable:
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/Compiler/GNU.cmake;hb=v2.8.8#l24
currently used to add -fPIC to compilation of objects in shared
libraries. Make its use based on the new property, and simply
make the property true by default for shared libraries.
-Brad
More information about the Kde-buildsystem
mailing list