summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake b/Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
index bb68a50..2de5a3a 100644
--- a/Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
+++ b/Tests/RunCMake/NinjaMultiConfig/CustomCommandOutputGenex.cmake
@@ -143,6 +143,16 @@ add_custom_command(
PROPERTY SYMBOLIC 1)
add_custom_target(echo_dbgx DEPENDS "$<$<CONFIG:Debug>:echo_dbgx_Debug.txt>")
+# A non-cross-config custom command expresses target dependencies in command config.
+add_custom_command(
+ OUTPUT echo_depend_target.txt
+ COMMAND ${CMAKE_COMMAND} -E env $<TARGET_FILE:echo> $<CONFIG>
+ # A real project should do:
+ # DEPENDS $<TARGET_FILE:echo>
+ # but here we are testing the target-level dependency implied by TARGET_FILE.
+ )
+add_custom_target(echo_depend_target DEPENDS echo_depend_target.txt)
+
add_custom_target(echo_target_raw
BYPRODUCTS echo_target_raw_$<CONFIG>.txt
COMMENT echo_target_raw