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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to