summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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\)$