[CMake] How to set platform-specific compiler-options from within CMakeFiles
Philip Lowman
philip at yhbt.com
Fri Jul 4 09:45:16 EDT 2008
On Thu, Jul 3, 2008 at 9:10 AM, Bill Hoffman <bill.hoffman at kitware.com>
wrote:
> Philip Lowman wrote:
>
> Wow this is an old thread. Sorry for the late response.
>>
>> I think what's needed here is a way to detect the platform and allow
>> people to modify CMAKE_CXX_FLAGS and friends before they get cemented in
>> stone in the cache. IIRC doesn't CMAKE_USER_MAKE_RULES_OVERRIDE put the
>> onus on the user to know the proper platform, compiler, etc. before they set
>> the flags?
>>
>>
> No, CMAKE_USER_MAKE_RULES_OVERRIDE is included after CMAKE_SYSTEM_NAME and
> the compiler are set. The _INIT variables will have been set, but the cache
> values have not yet been set. This allows you to set them.
Thanks! I didn't realize this feature existed. :)
--
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080704/18e9f8d7/attachment.htm>
More information about the CMake
mailing list