summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorVyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>2020-04-20 13:58:22 (GMT)
committerVyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>2020-04-20 16:49:17 (GMT)
commite5b33871ed7fd9d0b93596400509d455bfa41234 (patch)
treeae0365cfcf5dacd18e2ea5c223313f9c4a75f251 /Modules/ExternalProject.cmake
parent5d32699975d8623c19f74c75f22ee128a81508c8 (diff)
downloadCMake-e5b33871ed7fd9d0b93596400509d455bfa41234.zip
CMake-e5b33871ed7fd9d0b93596400509d455bfa41234.tar.gz
CMake-e5b33871ed7fd9d0b93596400509d455bfa41234.tar.bz2
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
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake2
1 files changed, 1 insertions, 1 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()