Brad King wrote:

> On 06/05/2012 01:23 PM, Stephen Kelly wrote:
>> Brad King wrote:
>>> You can't try_compile inside a platform file.
>> 
>> I'm not sure I'm trying to?
> 
> I thought you meant you would add the try_compile to the platform file
> to decide whether to report -fPIE.
> 
>> Do you mean in the tests, or do you mean the POSITION_INDEPENDENT_CODE
>> feature should be disabled for older GCC?
> 
> I mean that
> 
>   set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
> 
> should not be done if the compiler does not have -fPIE.
> Therefore Modules/Compiler/GNU.cmake needs to test the
> compiler version to decide whether -fPIE is available.

I see. Done for GNU.cmake now at least.

> Likely other toolchains will need similar checks.

We'll have to deal with those as they come I guess.

Thanks,

Steve.


--

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