summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-09-30 16:34:57 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-06 16:54:58 (GMT)
commit05f162ce9571d1ec7dee6f4c4b76126526247b14 (patch)
tree79071ee674bf7d74475c68a2ee946a8083ffc454 /Tests
parentc66f03adf93fc402141ed5dc17d39bae1af3bbfd (diff)
downloadCMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.zip
CMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.tar.gz
CMake-05f162ce9571d1ec7dee6f4c4b76126526247b14.tar.bz2
AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)
The code handling IMPLICIT_DEPENDS was only able to track a single file, the latest file replaced earlier files in the list. The documentation now mentions that the language has to be prefixed to every file and the test now uses two implicit dependencies, where only the second is modified to trigger re-running of the custom command. Alex Inspired-by: Michael Wild <themiwi@users.sourceforge.net>
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt3
-rw-r--r--Tests/BuildDepends/Project/dep_custom2.cxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 01f5f62..542c716 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -64,7 +64,8 @@ if("${CMAKE_GENERATOR}" MATCHES "Make")
# Test the IMPLICIT_DEPENDS feature.
set(ZOT_DEPENDS IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/dep.cxx)
set(ZOT_CUSTOM_DEP
- IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/dep_custom.cxx)
+ IMPLICIT_DEPENDS CXX ${CMAKE_CURRENT_SOURCE_DIR}/dep_custom.cxx
+ CXX ${CMAKE_CURRENT_SOURCE_DIR}/dep_custom2.cxx )
else()
# No IMPLICIT_DEPENDS...just depend directly.
set(ZOT_DEPENDS DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/zot.hxx.in)
diff --git a/Tests/BuildDepends/Project/dep_custom2.cxx b/Tests/BuildDepends/Project/dep_custom2.cxx
new file mode 100644
index 0000000..ac9dee1
--- /dev/null
+++ b/Tests/BuildDepends/Project/dep_custom2.cxx
@@ -0,0 +1,2 @@
+#include <zot_custom.hxx.in>
+// some comment