Ninja Multi-Config: Using cross-config genex inside normal genex
The following code snippet does not work.
add_custom_target(
tgt ALL
COMMAND ${CMAKE_COMMAND} -E echo "$<STREQUAL:$<CONFIG>,$<COMMAND_CONFIG:$<CONFIG>>>"
VERBATIM
)
build command
rm -rf build && cmake -S . -B build/ -G "Ninja Multi-Config" -DCMAKE_CROSS_CONFIGS=all && cmake --build build --config Release --target tg
t:Debug
I expect the generator expression to be evaluated as $<STREQUAL:Debug,Release>
and then equal to 0
.
It seems like the usage of $<COMMAND_CONFIG>
and $<OUTPUT_CONFIG>
inside other generator expressions is not supported.
Edited by Brad King