[CMake] Why is -fPIE added to my build?

Schlottke, Michael M.Schlottke at aia.rwth-aachen.de
Tue Jan 21 04:38:59 EST 2014


Yes, that's it, thank you! I thought the flag only affects library builds, but apparently not. 

Michael

On Jan 21, 2014, at 10:20 , Nils Gladitz wrote:

> On 01/21/2014 10:05 AM, Schlottke, Michael wrote:
>> 
>> However, I noticed that CMake adds the '-fPIE' flag to the compilation
>> flags without me asking for it.
> 
> Maybe there is a set(CMAKE_POSITION_INDEPENDENT_CODE ON) in the project or the POSITION_INDEPENDENT_CODE property is set for the target itself?
> 
> Nils



More information about the CMake mailing list