[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-311-g84a28fb

Brad King brad.king at kitware.com
Mon Feb 29 11:53:12 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  84a28fb506bbb398eab98c3524c050adc43acd6d (commit)
       via  190a5fdffd8104ad613854bdd563a0a11dd88f63 (commit)
      from  b5f27e7d852f5f64bfca2d7c6e1d068696d4372a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=84a28fb506bbb398eab98c3524c050adc43acd6d
commit 84a28fb506bbb398eab98c3524c050adc43acd6d
Merge: b5f27e7 190a5fd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 29 11:53:12 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 29 11:53:12 2016 -0500

    Merge topic 'enable-ssl-automatically' into next
    
    190a5fdf Automatically use OpenSSL by default on Linux and FreeBSD if available


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=190a5fdffd8104ad613854bdd563a0a11dd88f63
commit 190a5fdffd8104ad613854bdd563a0a11dd88f63
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 26 14:19:51 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 29 11:51:04 2016 -0500

    Automatically use OpenSSL by default on Linux and FreeBSD if available
    
    Since https is almost ubiquitous nowadays we should support it by
    default whenever possible.  When building our own curl, we already
    automatically enable SSL/TLS support on Windows and OS X by using the
    OS-native APIs.  On UNIX platforms we need to use OpenSSL but have not
    done so by default before, leading to possible user confusion when https
    transfers fail later.  Fix this by searching for OpenSSL quietly and
    enabling use of it automatically if it is found.
    
    Do this only on Linux and FreeBSD for now because on other UNIX
    platforms (e.g. AIX, HP-UX, SunOS) it seems too easy to find an
    OpenSSL that is not compatible with the target compiler.

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`.

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list