diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-09 19:40:31 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-09 19:40:31 (GMT) |
commit | a91947039a025df00403be2cadba469346f274a8 (patch) | |
tree | 67f7cfbde67246ac19514b692d966c71b75083a1 /Tests/CustomCommand | |
parent | aa9734ab6ceab283c83615ea52644ff730651dbc (diff) | |
download | CMake-a91947039a025df00403be2cadba469346f274a8.zip CMake-a91947039a025df00403be2cadba469346f274a8.tar.gz CMake-a91947039a025df00403be2cadba469346f274a8.tar.bz2 |
ENH: for all custom commands that can not be given to a target, add them to all targets in the current makefile
Diffstat (limited to 'Tests/CustomCommand')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 69b6d2f..3f7a999 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -3,6 +3,8 @@ # PROJECT (CustomCommand) +ADD_SUBDIRECTORY(GeneratedHeader) + # # Lib and exe path # @@ -133,8 +135,10 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/foo.c # auto-object-depends feature of the Makefile generator. Currently # the feature does not seem to work in Visual Studio generators so # these dependencies are needed. -SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c PROPERTIES - OBJECT_DEPENDS "${PROJECT_BINARY_DIR}/doc1.h;${PROJECT_BINARY_DIR}/foo.h") +#SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/foo.c +#PROPERTIES +# OBJECT_DEPENDS "${PROJECT_BINARY_DIR}/doc1.h;${PROJECT_BINARY_DIR}/foo.h" +#) # add the library ADD_EXECUTABLE(CustomCommand @@ -143,6 +147,9 @@ ADD_EXECUTABLE(CustomCommand ${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) + |