summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-21 12:20:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-21 12:21:46 (GMT)
commita583360d10d24c49d565503dbbaad4654b7e9c84 (patch)
treec2baf4d560acead2d777577fae563e5b6bfb3eaf
parenta0cf159b9bd464122e321c7293f04e31a82a3b7e (diff)
parente5b33871ed7fd9d0b93596400509d455bfa41234 (diff)
downloadCMake-a583360d10d24c49d565503dbbaad4654b7e9c84.zip
CMake-a583360d10d24c49d565503dbbaad4654b7e9c84.tar.gz
CMake-a583360d10d24c49d565503dbbaad4654b7e9c84.tar.bz2
Merge topic 'external-project-mkdir-step-fix'
e5b33871ed ExternalProject: Fix step dependency on mkdir step Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4640
-rw-r--r--Modules/ExternalProject.cmake2
-rw-r--r--Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt2
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index c1ca2b5..75f68c8 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -2282,7 +2282,7 @@ function(ExternalProject_Add_StepDependencies name step)
get_property(steps TARGET ${name} PROPERTY _EP_STEPS)
list(FIND steps ${step} is_step)
- if(NOT is_step)
+ if(is_step LESS 0)
message(FATAL_ERROR "External project \"${name}\" does not have a step \"${step}\".")
endif()
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
index 22e13bf..5fa75e8 100644
--- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
+++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
- Target "MyProj-IFace" was not generated by ExternalProject_Add_StepTargets.
+ External project "MyProj" does not have a step "IFace".
Call Stack \(most recent call first\):
Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
CMakeLists.txt:[0-9]+ \(include\)$