aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Warta <simon@kullo.net>2019-04-06 15:05:50 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-04-06 17:53:03 +0200
commit1a3aa5c32117e94d8838c8ec85a68e8ae83898c5 (patch)
treed90acd3147d5b024e1a3874c2df0c043580608c9
parent55734f3a27c2d495f724ea50d196fc9d9a91966b (diff)
cmake: don't run SORT on empty list
In case of an empty list, SORTing leads to the cmake error "list sub-command SORT requires list to be present." Closes https://github.com/curl/curl/pull/3736
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index edb1cec21..6f513c2bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1239,7 +1239,9 @@ _add_if("SCP" USE_LIBSSH2)
_add_if("SFTP" USE_LIBSSH2)
_add_if("RTSP" NOT CURL_DISABLE_RTSP)
_add_if("RTMP" USE_LIBRTMP)
-list(SORT _items)
+if(_items)
+ list(SORT _items)
+endif()
string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}")
message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}")