Feature Request: Access global properties from generator expression

A simple example:
Currently the global property must be assigned to a variable before being using in a generator expression:

get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin$<$<BOOL:${IS_MULTI_CONFIG}>:/$<CONFIG>>)

We can already access properties on a target with $<TARGET_PROPERTY:tgt,prop>. It would be good to have a similar mechanism to access global properties directly from generator expressions. Using an expression like $<GLOBAL_PROPERTY:prop> makes the above snippet:

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin$<$<GLOBAL_PROPERTY:GENERATOR_IS_MULTI_CONFIG>:/$<CONFIG>>)
1 Like