mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
ExternalProject: Fix step dependency on mkdir step
When looking at `list(FIND)` result, zero index is ignored due to incorrect error handling, and users can't set dependencies on mkdir step. Fixes: #20605
This commit is contained in:
@@ -2282,7 +2282,7 @@ function(ExternalProject_Add_StepDependencies name step)
|
|||||||
|
|
||||||
get_property(steps TARGET ${name} PROPERTY _EP_STEPS)
|
get_property(steps TARGET ${name} PROPERTY _EP_STEPS)
|
||||||
list(FIND steps ${step} is_step)
|
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}\".")
|
message(FATAL_ERROR "External project \"${name}\" does not have a step \"${step}\".")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\):
|
^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\):
|
Call Stack \(most recent call first\):
|
||||||
Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
|
Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\)
|
||||||
CMakeLists.txt:[0-9]+ \(include\)$
|
CMakeLists.txt:[0-9]+ \(include\)$
|
||||||
|
|||||||
Reference in New Issue
Block a user