You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/03/13 19:53:21 UTC
[2/5] mesos git commit: CMake: Added configuration options for SSL
builds.
CMake: Added configuration options for SSL builds.
This adds the option `ENABLE_SSL` to the CMake build. A subsequent
commit will add logic to search for SSL libraries and add the
necessary build flags.
Review: https://reviews.apache.org/r/57261
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/08a84b6c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/08a84b6c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/08a84b6c
Branch: refs/heads/master
Commit: 08a84b6ca88b318e399d286d858389b2e2f5623f
Parents: 1a4d2d9
Author: Joseph Wu <jo...@apache.org>
Authored: Tue Feb 28 17:06:36 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Mar 13 12:17:37 2017 -0700
----------------------------------------------------------------------
3rdparty/CMakeLists.txt | 12 ++++++++++++
cmake/CompilationConfigure.cmake | 18 ++++++++++++++++++
docs/configuration-cmake.md | 8 ++++++++
3 files changed, 38 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/08a84b6c/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 5fbe178..bb5f713 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -138,6 +138,18 @@ set(LIBEVENT_CMAKE_ARGS
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
)
+if (ENABLE_SSL)
+ set(LIBEVENT_CMAKE_ARGS
+ ${LIBEVENT_CMAKE_ARGS}
+ -DEVENT__DISABLE_OPENSSL=OFF
+ )
+else (ENABLE_SSL)
+ set(LIBEVENT_CMAKE_ARGS
+ ${LIBEVENT_CMAKE_ARGS}
+ -DEVENT__DISABLE_OPENSSL=ON
+ )
+endif (ENABLE_SSL)
+
if (NOT WIN32)
set(LIBEVENT_CMAKE_ARGS
${LIBEVENT_CMAKE_ARGS}
http://git-wip-us.apache.org/repos/asf/mesos/blob/08a84b6c/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index f9cb771..5936be0 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -70,6 +70,11 @@ option(
FALSE)
option(
+ ENABLE_SSL
+ "Build libprocess with SSL support"
+ FALSE)
+
+option(
HAS_AUTHENTICATION
"Build Mesos against authentication libraries"
TRUE)
@@ -115,6 +120,12 @@ if (WIN32 AND (NOT ENABLE_LIBEVENT))
"`-DENABLE_LIBEVENT=1` as an argument when you run CMake.")
endif (WIN32 AND (NOT ENABLE_LIBEVENT))
+if (ENABLE_SSL AND (NOT ENABLE_LIBEVENT))
+ message(
+ FATAL_ERROR
+ "'ENABLE_SSL' currently requires 'ENABLE_LIBEVENT'.")
+endif (ENABLE_SSL AND (NOT ENABLE_LIBEVENT))
+
# SYSTEM CHECKS.
################
@@ -286,6 +297,13 @@ set(MESOS_CPPFLAGS
-DPKGDATADIR="${DATA_INSTALL_PREFIX}"
)
+if (ENABLE_SSL)
+ set(MESOS_CPPFLAGS
+ ${MESOS_CPPFLAGS}
+ -DUSE_SSL_SOCKET=1
+ )
+endif (ENABLE_SSL)
+
# Calculate some build information.
string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M:%S UTC" UTC)
if (WIN32)
http://git-wip-us.apache.org/repos/asf/mesos/blob/08a84b6c/docs/configuration-cmake.md
----------------------------------------------------------------------
diff --git a/docs/configuration-cmake.md b/docs/configuration-cmake.md
index c7cb09a..d2eb571 100644
--- a/docs/configuration-cmake.md
+++ b/docs/configuration-cmake.md
@@ -71,6 +71,14 @@ the CMake build system.
</tr>
<tr>
<td>
+ -DENABLE_SSL
+ </td>
+ <td>
+ Build libprocess with SSL support. [default=FALSE]
+ </td>
+ </tr>
+ <tr>
+ <td>
-DHAS_AUTHENTICATION
</td>
<td>