[CMake] How to set a preprocessor define for all build configurations except one ?

Glenn Coombs glenn.coombs at gmail.com
Mon Jun 20 07:04:55 EDT 2011


Thanks for the clarification - I have a much clearer understanding now.

--
Glenn

On 18 June 2011 14:30, Michael Hertling <mhertling at online.de> wrote:

>
> COMPILE_DEFINITIONS is used *always*, i.e. for every generator in every
> configuration, and COMPILE_DEFINITIONS_<CONFIG> is used *additionally*
> in configuration <CONFIG>, so it can not be used to remove definitions
> added to COMPILE_DEFINITIONS; in fact, these properties are completely
> independent from each other.
>
> > Would that approach have worked for the multi-config generators ?  Do
> they
> > use the concatenation of COMPILE_DEFINITIONS and
> COMPILE_DEFINITIONS_<active
> > config> ?
>
> All generators use this concatenation, and that's the reason why you
> must handle "NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE"
> separately one way or another if the GEN_OUTFILES definition is to
> be enabled always except for the RELEASENOOUTFILES configuration.
>
> Regards,
>
> Michael
> _______________________________________________
> 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://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110620/8986038d/attachment.htm>


More information about the CMake mailing list