summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCasey Bodley <cbodley@redhat.com>2017-11-26 21:46:26 +0100
committerCasey Bodley <cbodley@redhat.com>2018-01-05 20:55:23 +0100
commitb589b73c70bc4c644b7a040d9aee5083881254b9 (patch)
tree291cb8cbfb1fa096d2b67c0c185b42e7b0620d2e /CMakeLists.txt
parentcmake: remove Beast submodule and include path (diff)
downloadceph-b589b73c70bc4c644b7a040d9aee5083881254b9.tar.xz
ceph-b589b73c70bc4c644b7a040d9aee5083881254b9.zip
cmake: add WITH_BOOST_CONTEXT option
adds a more specific option for this boost::context dependency, which was previously only used by the radosgw beast frontend. see http://tracker.ceph.com/issues/20048 for more background Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfbdaef28bb..8316276cf08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -390,6 +390,11 @@ if(WITH_BLKIN)
include_directories(SYSTEM src/blkin/blkin-lib)
endif(WITH_BLKIN)
+option(WITH_BOOST_CONTEXT "Enable boost::asio stackful coroutines" ON)
+if(WITH_BOOST_CONTEXT)
+ set(HAVE_BOOST_CONTEXT ON)
+endif()
+
#option for RGW
option(WITH_RADOSGW "Rados Gateway is enabled" ON)
option(WITH_RADOSGW_FCGI_FRONTEND "Rados Gateway's FCGI frontend is enabled" OFF)
@@ -399,6 +404,10 @@ if(WITH_RADOSGW)
if(WITH_RADOSGW_FCGI_FRONTEND)
find_package(fcgi REQUIRED)
endif()
+ if(WITH_RADOSGW_BEAST_FRONTEND AND NOT WITH_BOOST_CONTEXT)
+ message(WARNING "disabling WITH_RADOSGW_BEAST_FRONTEND, which depends on WITH_BOOST_CONTEXT")
+ set(WITH_RADOSGW_BEAST_FRONTEND OFF)
+ endif()
endif(WITH_RADOSGW)
@@ -570,6 +579,9 @@ set(BOOST_HEADER_COMPONENTS container)
if(WITH_MGR)
list(APPEND BOOST_COMPONENTS python)
endif()
+if(WITH_BOOST_CONTEXT)
+ list(APPEND BOOST_COMPONENTS context coroutine)
+endif()
set(Boost_USE_MULTITHREADED ON)
# require minimally the bundled version