diff options
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 13f42335c5..19e3c2c194 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -423,3 +423,16 @@ ADD_CUSTOM_TARGET(DifferentName ALL ) # # </SameNameTest> + +# Per-config target name and generator expressions. +ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../PerConfig PerConfig) +ADD_CUSTOM_COMMAND( + OUTPUT perconfig.out + COMMAND ${PerConfig_COMMAND} + DEPENDS ${PerConfig_DEPENDS} + VERBATIM + ) +SET_PROPERTY(SOURCE perconfig.out PROPERTY SYMBOLIC 1) +ADD_CUSTOM_TARGET(perconfig_target ALL + COMMAND ${CMAKE_COMMAND} -E echo "perconfig=$<TARGET_FILE:perconfig>" "config=$<CONFIGURATION>" + DEPENDS perconfig.out) |