]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add WITH_BOOST_CONTEXT option
authorCasey Bodley <cbodley@redhat.com>
Sun, 26 Nov 2017 20:46:26 +0000 (15:46 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 8 Jan 2018 21:49:13 +0000 (16:49 -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>
(cherry picked from commit b589b73c70bc4c644b7a040d9aee5083881254b9)

Conflicts:
src/include/config-h.in.cmake (missing HAVE_GETENTROPY from
                  https://github.com/ceph/ceph/pull/17972)

CMakeLists.txt
ceph.spec.in
debian/rules
src/include/config-h.in.cmake

index 1468855f5e6eefd6e6d7db662ad80d2aad0b1299..44e3a65ef90a12f5152fa2bfb22611e65143b0c4 100644 (file)
@@ -362,6 +362,11 @@ if(WITH_BLKIN)
   include_directories(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)
@@ -371,6 +376,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)
 
 
@@ -542,6 +551,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 1b1a23b1fd19c442ea50e67e0ddc0470a33a98bd..a3bfdb5933408d053eb8dc61706c751124138cc4 100644 (file)
@@ -846,9 +846,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 857888f84e764632b5e3eee1f4d37a41ccdd3f97..9970a3126eb17ec5a09c4f6629e295c8b90299ae 100755 (executable)
@@ -23,10 +23,10 @@ ifeq ($(DEB_HOST_ARCH), armel)
 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 2847ceea2a8e2a21190a2572eb1b755b249f0bd5..2fa8eeff40b0f9d09a7978bc2fb6a63846f3363b 100644 (file)
 /* Define to 1 if you have the `getprogname' function. */
 #cmakedefine HAVE_GETPROGNAME 1
 
+/* Defined if boost::context is available */
+#cmakedefine HAVE_BOOST_CONTEXT
+
 #endif /* CONFIG_H */