]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add WITH_BOOST_CONTEXT option 19808/head
authorCasey Bodley <cbodley@redhat.com>
Sun, 26 Nov 2017 20:46:26 +0000 (15:46 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 5 Jan 2018 19:55:23 +0000 (14:55 -0500)
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>
CMakeLists.txt
ceph.spec.in
debian/rules
src/include/config-h.in.cmake

index cfbdaef28bb3348d743c4259b160a452b1808d9b..8316276cf08f9497999fa98349e6ddcadce6f65b 100644 (file)
@@ -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
index 517be8f3be495fedd5bd8dce4d33a6b6afbded77..a9fb8bbdc24a6c464c8edbecd3cda14876827a27 100644 (file)
@@ -862,9 +862,9 @@ cmake .. \
     -DWITH_OCF=ON \
 %endif
 %ifarch aarch64 armv7hl mips mipsel ppc ppc64 ppc64le %{ix86} x86_64
-    -DWITH_RADOSGW_BEAST_FRONTEND=ON \
+    -DWITH_BOOST_CONTEXT=ON \
 %else
-    -DWITH_RADOSGW_BEAST_FRONTEND=OFF \
+    -DWITH_BOOST_CONTEXT=OFF \
 %endif
     -DBOOST_J=%{_smp_ncpus}
 
index 61dc2d3c1c1c46cbf56103efb8eeef1feb111681..8678b2905e9c4a953f9fd301d88b1293597fb8fd 100755 (executable)
@@ -17,10 +17,10 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 endif
 
 ifneq (,$(filter $(DEB_HOST_ARCH), arm armel armhf arm64 i386 amd64 mips mipsel powerpc ppc64))
-  # beast depends on libboost_context which only support the archs above
-  extraopts += -DWITH_RADOSGW_BEAST_FRONTEND=ON
+  # libboost_context only support the archs above
+  extraopts += -DWITH_BOOST_CONTEXT=ON
 else
-  extraopts += -DWITH_RADOSGW_BEAST_FRONTEND=OFF
+  extraopts += -DWITH_BOOST_CONTEXT=OFF
 endif
 
 %:
index 46beb891ed6d8ff89d45e3959faa48f3215a077d..7030a53bd8cac0ec42418fb712d7126a31011dee 100644 (file)
 /* Defined if getentropy() is available */
 #cmakedefine HAVE_GETENTROPY
 
+/* Defined if boost::context is available */
+#cmakedefine HAVE_BOOST_CONTEXT
+
 #endif /* CONFIG_H */