mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 06:40:48 -06:00
Evaluate and expand generator expressions in the `COMMENT` argument of the `add_custom_command()` and `add_custom_target()` commands. This allows to include generator expressions, e.g. a targets location $<TARGET_...> or the current configuration $<CONFIG>, in the build-time messages. Fixes #22507
7 lines
237 B
CMake
7 lines
237 B
CMake
add_custom_target(helper)
|
|
set_property(TARGET helper PROPERTY MY_TEXT "lorem ipsum")
|
|
add_custom_target(main ALL
|
|
COMMAND ${CMAKE_COMMAND} -E true
|
|
COMMENT "$<TARGET_PROPERTY:helper,MY_TEXT>$<COMMA> $<STREQUAL:foo,bar>$<EQUAL:42,42>"
|
|
)
|