summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-01 13:15:09 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-07-01 13:15:09 (GMT)
commit62428f5e72a9f3fbc0cb0d64b8215f8023386f65 (patch)
tree06ff7cbdb9a7809ef2cce1684adf418f0af95ec5 /Tests
parent07095e1ea7a82d4d2c0b89931cc860539569c1e5 (diff)
parent539356f1281902f5494828eca963d95e2b726dda (diff)
downloadCMake-62428f5e72a9f3fbc0cb0d64b8215f8023386f65.zip
CMake-62428f5e72a9f3fbc0cb0d64b8215f8023386f65.tar.gz
CMake-62428f5e72a9f3fbc0cb0d64b8215f8023386f65.tar.bz2
Merge topic 'ninja_phony_targets'
539356f Ninja: Custom Command file depends don't need to exist before building 874e171 Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static 88d27ad Add a test to expose a bug with add_custom_command and ninja.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CustomCommand/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt
index d3ced3f..30daa7d 100644
--- a/Tests/CustomCommand/CMakeLists.txt
+++ b/Tests/CustomCommand/CMakeLists.txt
@@ -123,6 +123,19 @@ add_custom_command(
COMMENT "Running TDocument post-build commands"
)
+# Setup a custom target that will fail if the POST_BUILD custom command
+# isn't run before it.
+add_custom_command(
+ OUTPUT doc3post.txt
+ DEPENDS ${PROJECT_BINARY_DIR}/doc2post.txt
+ COMMAND ${CMAKE_COMMAND} -E echo " Copying doc2pre.txt to doc3post.txt."
+ COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc2post.txt
+ ${PROJECT_BINARY_DIR}/doc3post.txt
+ COMMENT "Running TDocument post-build dependent custom command"
+ )
+add_custom_target(doc3Post ALL DEPENDS doc3post.txt)
+add_dependencies(doc3Post TDocument)
+
################################################################
#
# Test using a multistep generated file