summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-12-20 17:58:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-20 17:58:31 (GMT)
commit1a81acdd229f066d7b50df984d84904e923a2f28 (patch)
tree7a6fae41cc5f80e934a8da8af17bf4b5a90ecc1d /Tests
parent2fafa66b182aff78bb9f26928a61379e5a9b2f1c (diff)
parentf5126badd8aadd307a2d38b215cb1dc2ff43647d (diff)
downloadCMake-1a81acdd229f066d7b50df984d84904e923a2f28.zip
CMake-1a81acdd229f066d7b50df984d84904e923a2f28.tar.gz
CMake-1a81acdd229f066d7b50df984d84904e923a2f28.tar.bz2
Merge topic 'add_custom_command-depends-path'
f5126badd8 add_custom_command: convert DEPENDS path arguments to absolute paths a5f44ec925 cmAddCustomCommandCommand: remove unnecessary braces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4148
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CustomCommand/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index e4b50d0..70e8476 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -534,3 +534,18 @@ add_custom_command(
set_property(SOURCE "${gen_file}" PROPERTY SYMBOLIC ON)
add_custom_target(command_expand_lists ALL DEPENDS "${gen_file}")
set_property(TARGET command_expand_lists PROPERTY CMPARGS "${cmp_args}")
+
+set(depends_path "./depended_upon_path.txt")
+
+add_custom_command(
+ OUTPUT ${depends_path}
+ COMMAND ${CMAKE_COMMAND} -E touch ${depends_path}
+)
+
+add_custom_command(
+ OUTPUT "depends_on_path.txt"
+ COMMAND ${CMAKE_COMMAND} -E touch "depends_on_path.txt"
+ DEPENDS ${depends_path}
+)
+
+add_custom_target(depends_on_path ALL DEPENDS "depends_on_path.txt")