diff options
author | Brad King <brad.king@kitware.com> | 2020-07-29 12:05:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-29 12:05:47 (GMT) |
commit | 292a86bb8e0a60a484c0371d691125b84dabdf39 (patch) | |
tree | b3f1bdf050c2be56ce7b0be9f9b277d3f0edd184 /Modules/FindCURL.cmake | |
parent | 49c600952e913907c608e1387594fe040c70054b (diff) | |
parent | 0faedae33531372fb01b158a449d03ecf9e78ee0 (diff) | |
download | CMake-292a86bb8e0a60a484c0371d691125b84dabdf39.zip CMake-292a86bb8e0a60a484c0371d691125b84dabdf39.tar.gz CMake-292a86bb8e0a60a484c0371d691125b84dabdf39.tar.bz2 |
Merge topic 'FindCURL-list-index-if'
0faedae335 FindCURL: Fix list index check after search
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5070
Diffstat (limited to 'Modules/FindCURL.cmake')
-rw-r--r-- | Modules/FindCURL.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake index 3acadc2..74b36c6 100644 --- a/Modules/FindCURL.cmake +++ b/Modules/FindCURL.cmake @@ -150,16 +150,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") |