summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends/Project
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-05 14:56:26 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-05 14:56:26 (GMT)
commit65ea5eb721d820551653bf6471e83ed5f4a5ba13 (patch)
tree32eb05579e0b909a5498d6ffa467269c2c2c5161 /Tests/BuildDepends/Project
parent644b4688d71cc52f8499d6103495de0909319557 (diff)
downloadCMake-65ea5eb721d820551653bf6471e83ed5f4a5ba13.zip
CMake-65ea5eb721d820551653bf6471e83ed5f4a5ba13.tar.gz
CMake-65ea5eb721d820551653bf6471e83ed5f4a5ba13.tar.bz2
Tests: Cover rebuild with multiple custom command outputs (#15116)
Extend the BuildDepends test with a case covering multiple custom command outputs with the second one consumed by another rule. With the old "multiple output pair" infrastructure used in the Makefile and Xcode generators this did not work. Now that it is fixed, test the case explicitly.
Diffstat (limited to 'Tests/BuildDepends/Project')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 9ee4a43..cb9fbf8 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -151,3 +151,16 @@ ExternalProject_Add(ExternalBuild
-Dexternal_out=${CMAKE_CURRENT_BINARY_DIR}/external.out
INSTALL_COMMAND ""
)
+
+add_custom_command(
+ OUTPUT multi1-out1.txt multi1-out2.txt
+ COMMAND ${CMAKE_COMMAND} -E copy multi1-in.txt multi1-out1.txt
+ COMMAND ${CMAKE_COMMAND} -E copy multi1-in.txt multi1-out2.txt
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/multi1-in.txt
+ )
+add_custom_command(
+ OUTPUT multi1-out2-copy.txt
+ COMMAND ${CMAKE_COMMAND} -E copy multi1-out2.txt multi1-out2-copy.txt
+ DEPENDS multi1-out2.txt
+ )
+add_custom_target(multi1 ALL DEPENDS multi1-out2-copy.txt)