summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-07 15:02:37 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-07 15:02:37 (GMT)
commite0751c4d25bba7364a361a55fe31d1567b64e51f (patch)
tree317b61f67da89db082e89f3821beda7e7db7ace8
parent4debd8beb11eaeb6968813f318a9fe0fc04324e6 (diff)
parent190a5fdffd8104ad613854bdd563a0a11dd88f63 (diff)
downloadCMake-e0751c4d25bba7364a361a55fe31d1567b64e51f.zip
CMake-e0751c4d25bba7364a361a55fe31d1567b64e51f.tar.gz
CMake-e0751c4d25bba7364a361a55fe31d1567b64e51f.tar.bz2
Merge topic 'enable-ssl-automatically'
190a5fdf Automatically use OpenSSL by default on Linux and FreeBSD if available
-rw-r--r--CMakeLists.txt10
-rw-r--r--Help/release/dev/enable-ssl-automatically.rst8
2 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9381f35..787f319 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -327,7 +327,15 @@ macro (CMAKE_BUILD_UTILITIES)
if(CMAKE_TESTS_CDASH_SERVER)
set(CMAKE_CURL_TEST_URL "${CMAKE_TESTS_CDASH_SERVER}/user.php")
endif()
- option(CMAKE_USE_OPENSSL "Use OpenSSL." OFF)
+ set(_CMAKE_USE_OPENSSL_DEFAULT OFF)
+ if(NOT DEFINED CMAKE_USE_OPENSSL AND NOT WIN32 AND NOT APPLE
+ AND CMAKE_SYSTEM_NAME MATCHES "(Linux|FreeBSD)")
+ find_package(OpenSSL QUIET)
+ if(OPENSSL_FOUND)
+ set(_CMAKE_USE_OPENSSL_DEFAULT ON)
+ endif()
+ endif()
+ option(CMAKE_USE_OPENSSL "Use OpenSSL." ${_CMAKE_USE_OPENSSL_DEFAULT})
mark_as_advanced(CMAKE_USE_OPENSSL)
if(CMAKE_USE_OPENSSL)
set(CURL_CA_BUNDLE "" CACHE FILEPATH "Path to SSL CA Certificate Bundle")
diff --git a/Help/release/dev/enable-ssl-automatically.rst b/Help/release/dev/enable-ssl-automatically.rst
new file mode 100644
index 0000000..8ded656
--- /dev/null
+++ b/Help/release/dev/enable-ssl-automatically.rst
@@ -0,0 +1,8 @@
+enable-ssl-automatically
+------------------------
+
+* On Linux and FreeBSD platforms, when building CMake itself from source and
+ not using a system-provided libcurl, OpenSSL is now used by default if it is
+ found on the system. This enables SSL/TLS support for commands supporting
+ network communication via ``https``, such as :command:`file(DOWNLOAD)`,
+ :command:`file(UPLOAD)`, and :command:`ctest_submit`.