diff options
author | Brad King <brad.king@kitware.com> | 2010-12-08 22:05:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-08 22:14:17 (GMT) |
commit | ced1d5eccd4ae08a6431a5c163be3dd52ca9d59a (patch) | |
tree | 5a27f713d1b55ba4b4426730ff3f3c751afbc5a9 /Tests | |
parent | e30a775f68ddae48ca6987fc2c21c07844a26804 (diff) | |
download | CMake-ced1d5eccd4ae08a6431a5c163be3dd52ca9d59a.zip CMake-ced1d5eccd4ae08a6431a5c163be3dd52ca9d59a.tar.gz CMake-ced1d5eccd4ae08a6431a5c163be3dd52ca9d59a.tar.bz2 |
Skip file-level dependencies on custom targets (#11332)
A custom command may name a target created by add_custom_target in its
DEPENDS field. Treat this case as a target-level dependency only since
a custom target provides no standard file on which to add a file-level
dependency.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 76208d4..746c9a7 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -130,6 +130,7 @@ ADD_CUSTOM_COMMAND( ################################################################ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.pre DEPENDS ${PROJECT_SOURCE_DIR}/foo.in + TDocument # Ensure doc1.h generates before this target COMMAND ${CMAKE_COMMAND} ARGS -E copy ${PROJECT_SOURCE_DIR}/foo.in ${PROJECT_BINARY_DIR}/foo.pre @@ -181,10 +182,6 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/generated.c TARGET_LINK_LIBRARIES(CustomCommand GeneratedHeader) -# must add a dependency on TDocument otherwise it might never build and -# the CustomCommand executable really needs doc1.h -ADD_DEPENDENCIES(CustomCommand TDocument) - ############################################################################## # Test for using just the target name as executable in the COMMAND # section. Has to be recognized and replaced by CMake with the output |