summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends/Project/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-09-17 14:51:05 (GMT)
committerBrad King <brad.king@kitware.com>2007-09-17 14:51:05 (GMT)
commit423cdb561c129da439ebf2c61d6ddbcc5fb516e7 (patch)
tree8f982370ea10629ec96f2f5bea3d662b40f11998 /Tests/BuildDepends/Project/CMakeLists.txt
parentd7a5d4c191b503f0d30abf9fbf0672370157c430 (diff)
downloadCMake-423cdb561c129da439ebf2c61d6ddbcc5fb516e7.zip
CMake-423cdb561c129da439ebf2c61d6ddbcc5fb516e7.tar.gz
CMake-423cdb561c129da439ebf2c61d6ddbcc5fb516e7.tar.bz2
ENH: Adding test for ADD_CUSTOM_COMMAND's new IMPLICIT_DEPENDS feature.
Diffstat (limited to 'Tests/BuildDepends/Project/CMakeLists.txt')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 4f188b6..2651adf 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -27,3 +27,21 @@ add_executable(bar bar.cxx
${CMAKE_CURRENT_BINARY_DIR}/regen.h
${CMAKE_CURRENT_BINARY_DIR}/noregen.h
)
+
+#-----------------------------------------------------------------------------
+IF("${CMAKE_GENERATOR}" MATCHES "Make")
+ # Test the IMPLICIT_DEPENDS feature.
+ SET(ZOT_DEPENDS IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/dep.cxx)
+ELSE("${CMAKE_GENERATOR}" MATCHES "Make")
+ # No IMPLICIT_DEPENDS...just depend directly.
+ SET(ZOT_DEPENDS DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx.in)
+ENDIF("${CMAKE_GENERATOR}" MATCHES "Make")
+add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx.in
+ ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx
+ ${ZOT_DEPENDS}
+ )
+
+add_executable(zot zot.cxx ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx)