diff options
author | Brad King <brad.king@kitware.com> | 2005-02-22 17:04:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-02-22 17:04:02 (GMT) |
commit | 7da6124416d2e7b2fb586b03bbb3c0d7cf836d13 (patch) | |
tree | d019539c5b36685e295cef866cd25df6d2454a9c | |
parent | 12c4e90294c812447bfcb8be52e0a6e19af913bd (diff) | |
download | CMake-7da6124416d2e7b2fb586b03bbb3c0d7cf836d13.zip CMake-7da6124416d2e7b2fb586b03bbb3c0d7cf836d13.tar.gz CMake-7da6124416d2e7b2fb586b03bbb3c0d7cf836d13.tar.bz2 |
ENH: Added test for multiple commands in a custom command.
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 5446451..162878b 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -66,16 +66,19 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/doc1.dvi ) ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/doc1.h - DEPENDS ${PROJECT_BINARY_DIR}/doc1.dvi - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${PROJECT_BINARY_DIR}/doc1.dvi - ${PROJECT_BINARY_DIR}/doc1.h + DEPENDS ${PROJECT_BINARY_DIR}/doc1.dvi + COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.dvi + ${PROJECT_BINARY_DIR}/doc1temp.h + COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1temp.h + ${PROJECT_BINARY_DIR}/doc1.h ) -ADD_CUSTOM_TARGET(TDocument ALL - ${CMAKE_COMMAND} -E echo "building doc1.h" +ADD_CUSTOM_TARGET(TDocument ALL + COMMAND ${CMAKE_COMMAND} -E echo "Copying doc1.h to doc2.h." + COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h + ${PROJECT_BINARY_DIR}/doc2.h DEPENDS ${PROJECT_BINARY_DIR}/doc1.h - ) + ) ################################################################ # @@ -90,12 +93,15 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.pre ) ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.c - DEPENDS TDocument ${PROJECT_BINARY_DIR}/foo.pre + DEPENDS ${PROJECT_BINARY_DIR}/foo.pre COMMAND ${CMAKE_COMMAND} ARGS -E copy ${PROJECT_BINARY_DIR}/foo.pre ${PROJECT_BINARY_DIR}/foo.c ) +SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES + OBJECT_DEPENDS ${PROJECT_BINARY_DIR}/doc1.h) + # add the library ADD_EXECUTABLE(CustomCommand ${PROJECT_BINARY_DIR}/foo.c |