summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-29 12:05:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-29 12:05:47 (GMT)
commit7b4ffd4d25712484ff815e446db366124f6edf66 (patch)
tree858d3199e2af149197b86b1ba91042cf55197b5b
parentdde97681e9eabcb6aada1d5d2d90a9b34beddc0f (diff)
parent0faedae33531372fb01b158a449d03ecf9e78ee0 (diff)
downloadCMake-7b4ffd4d25712484ff815e446db366124f6edf66.zip
CMake-7b4ffd4d25712484ff815e446db366124f6edf66.tar.gz
CMake-7b4ffd4d25712484ff815e446db366124f6edf66.tar.bz2
Merge topic 'FindCURL-list-index-if' into release-3.18
0faedae335 FindCURL: Fix list index check after search Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5070
-rw-r--r--Modules/FindCURL.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index 919babc..be7e16e 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -148,16 +148,16 @@ if(CURL_FIND_COMPONENTS)
endif()
foreach(component IN LISTS CURL_FIND_COMPONENTS)
list(FIND CURL_KNOWN_PROTOCOLS ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
list(FIND CURL_SUPPORTED_PROTOCOLS ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
set(CURL_${component}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED)
message(FATAL_ERROR "CURL: Required protocol ${component} is not found")
endif()
else()
list(FIND CURL_SUPPORTED_FEATURES ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
set(CURL_${component}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED)
message(FATAL_ERROR "CURL: Required feature ${component} is not found")