[cmake-developers] conditionals in generator expressions

Stephen Kelly steveire at gmail.com
Mon Aug 27 06:35:39 EDT 2012


Stephen Kelly wrote:
> 
> The STREQUAL expression also makes the CONFIG expression redundant and
> equivalent to $<STREQUAL:$<CONFIGURATION>,...>. I can see reason to keep
> CONFIG anyway because it is more convenient and is expected to be commonly
> used I think.

Actually, a good reason to keep the CONFIG expression is to make it handle 
CONFIGURATION_MAPs.

For example, $<CONFIG:RELEASE> should be "1" if CMAKE_BUILD_TYPE is Coverage 
and thisTarget has MAP_IMPORTED_CONFIG_COVERAGE "RELEASE". 

That came to mind with this thread:

http://thread.gmane.org/gmane.comp.lib.qt.devel/5919/focus=5925

Thanks,

Steve.





More information about the cmake-developers mailing list