summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProject
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-16 14:10:48 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-16 15:35:58 (GMT)
commitc0f1af926feb3494ada1a311441ea144926157a2 (patch)
tree8a560f8074bc84bbc84a1e04386d650d8da97e24 /Tests/ExternalProject
parent3a7d1ce3ff0ea0565d463a341f42acd6bed8a6c4 (diff)
downloadCMake-c0f1af926feb3494ada1a311441ea144926157a2.zip
CMake-c0f1af926feb3494ada1a311441ea144926157a2.tar.gz
CMake-c0f1af926feb3494ada1a311441ea144926157a2.tar.bz2
ExternalProject: Allow DEPENDS on normal targets (#13849)
The ExternalProject_Add DEPENDS option adds two types of dependencies. It adds a target-level build order dependency between the external project target and the named targets. It also adds a file-level dependency on the "done" stamp file of the named external project targets. Targets not created by ExternalProject_Add have no such stamp file and no _EP_STAMP_DIR property. Prior to commit d14c0243 (Refactor repeated code into function, 2012-04-26) we unconditionally accepted an empty stamp dir and generated a dependency on a non-existent file. After that commit we generate an error that no stamp dir is set. Skip the file-level dependency when the named dependency is not an external project target in order to allow this use case. Teach the ExternalProject test to cover the case.
Diffstat (limited to 'Tests/ExternalProject')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index e24a979..602ff0f 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -50,6 +50,8 @@ if(NOT DEFINED can_build_tutorial_step5)
endif()
endif()
+add_custom_target(NonExternalProjectTarget
+ COMMAND ${CMAKE_COMMAND} -E echo NonExternalProjectTarget)
# Empty projects that test all the known ExternalProject_Add argument key words:
#
@@ -94,7 +96,7 @@ ExternalProject_Add(${proj}
CVS_REPOSITORY ""
CVS_MODULE ""
CVS_TAG ""
- DEPENDS "MinimalNoOpProject"
+ DEPENDS "MinimalNoOpProject" NonExternalProjectTarget
DOWNLOAD_COMMAND ""
INSTALL_COMMAND ""
PATCH_COMMAND ""