From 8cf02025abf096553bc32db44d2c74605289d0d0 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 7 Jul 2024 19:29:08 +0200 Subject: [PATCH] cmake: feature casing fix and tidy-ups - fix casing of a feature (`Unicode`) in the feature list. - sort TLS backends case-insensitively. - sync feature/protocol list heading with `curl -V` and autotools. Closes #14120 --- CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ac8100e4e9..22c7cc9f4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1702,7 +1702,7 @@ if(NOT CURL_DISABLE_INSTALL) endif() string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}") string(TOLOWER "${SUPPORT_PROTOCOLS}" SUPPORT_PROTOCOLS_LOWER) - message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS_LOWER}") + message(STATUS "Protocols: ${SUPPORT_PROTOCOLS_LOWER}") # Clear list and try to detect available features set(_items) @@ -1735,7 +1735,7 @@ if(NOT CURL_DISABLE_INSTALL) OR USE_SCHANNEL OR USE_RUSTLS OR USE_BEARSSL OR USE_MBEDTLS OR USE_SECTRANSP OR (USE_WOLFSSL AND HAVE_WOLFSSL_FULL_BIO))) - _add_if("unicode" ENABLE_UNICODE) + _add_if("Unicode" ENABLE_UNICODE) _add_if("threadsafe" HAVE_ATOMIC OR (USE_THREADS_POSIX AND HAVE_PTHREAD_H) OR (WIN32 AND HAVE_WIN32_WINNT GREATER_EQUAL 0x600)) @@ -1751,7 +1751,7 @@ if(NOT CURL_DISABLE_INSTALL) endif() endif() string(REPLACE ";" " " SUPPORT_FEATURES "${_items}") - message(STATUS "Enabled features: ${SUPPORT_FEATURES}") + message(STATUS "Features: ${SUPPORT_FEATURES}") # Clear list and collect SSL backends set(_items) @@ -1764,7 +1764,11 @@ if(NOT CURL_DISABLE_INSTALL) _add_if("GnuTLS" SSL_ENABLED AND USE_GNUTLS) if(_items) - list(SORT _items) + if(NOT CMAKE_VERSION VERSION_LESS 3.13) + list(SORT _items CASE INSENSITIVE) + else() + list(SORT _items) + endif() endif() string(REPLACE ";" " " SSL_BACKENDS "${_items}") message(STATUS "Enabled SSL backends: ${SSL_BACKENDS}")