[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.42 1.43
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Aug 5 13:27:16 EDT 2008
Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv30401/Tests/CustomCommand
Modified Files:
CMakeLists.txt
Log Message:
ENH: Test relative path custom command output
As of CMake 2.6 a custom command output specified by relative path is
placed in the build tree. This adds a test to make sure other
references to the output are hooked up correctly, fixing a bug in CMake
2.6.1.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.42
retrieving revision 1.43
diff -C 2 -d -r1.42 -r1.43
*** CMakeLists.txt 4 Jun 2008 16:10:59 -0000 1.42
--- CMakeLists.txt 5 Aug 2008 17:27:14 -0000 1.43
***************
*** 84,87 ****
--- 84,97 ----
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
+ # Test generation of a file to the build tree without full path. As
+ # of CMake 2.6 custom command outputs specified by relative path go in
+ # the build tree.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT doc1.txt
+ COMMAND ${CMAKE_COMMAND} -E echo "Example Document Target" > doc1.txt
+ DEPENDS doc1.tex
+ VERBATIM
+ )
+
# Add a custom target to drive generation of doc1.h.
ADD_CUSTOM_TARGET(TDocument ALL
***************
*** 89,93 ****
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
${PROJECT_BINARY_DIR}/doc2.h
! DEPENDS ${PROJECT_BINARY_DIR}/doc1.h
COMMENT "Running top-level TDocument commands"
)
--- 99,103 ----
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/doc1.h
${PROJECT_BINARY_DIR}/doc2.h
! DEPENDS ${PROJECT_BINARY_DIR}/doc1.h doc1.txt
COMMENT "Running top-level TDocument commands"
)
More information about the Cmake-commits
mailing list