Brad King wrote:

> On 06/05/2012 11:54 AM, Stephen Kelly wrote:
>> I can add a try_compile for -fPIE on APPLE (though I wonder if it would
>> work), but still, I expect to see something like that in the OUTPUT
>> variable from check_cxx_source_compiles...
> 
> The OUTPUT variable is internal to the macro and not documented as holding
> anything when the call returns.  A quick glance doesn't tell me why the
> value isn't leaking out as an implementation detail though.
> 
> You can't try_compile inside a platform file.

I'm not sure I'm trying to?

> It's too early in the
> init process because the platform files are needed to generate inside
> the try_compile.  You would have to run your own execute_process and
> invoke the compiler directly.  I suggest checking the compiler version
> rather than testing the flag.  Just checking CMAKE_C_COMPILER_VERSION
> might be enough in this case.

Do you mean in the tests, or do you mean the POSITION_INDEPENDENT_CODE 
feature should be disabled for older GCC?

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