]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: define BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT for Boost.Asio users 38759/head
authorKefu Chai <kchai@redhat.com>
Tue, 24 Nov 2020 06:12:54 +0000 (14:12 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 4 Jan 2021 15:37:56 +0000 (23:37 +0800)
see also
https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/std_executors.html#boost_asio.std_executors.polymorphic_i_o_executor

we could use `asio::any_io_executor` later on though for better
performance.

also, define CMP0093, so FindBoost reports Boost_VERSION in x.y.z
format. it is simpler to use `VERSION_GREATER_EQUAL` to compare its
version with 1.74 instead of its C macro version ("107000").

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 3d708219092d0e89a1434c30ffc8a4999f062cc0)

Conflicts:
CMakeLists.txt
src/librbd/CMakeLists.txt: trivial resolutions

CMakeLists.txt
src/librbd/CMakeLists.txt

index 7a71e53ad79bcabf361fff2912a85fe7f1c32bf2..79bc8c694b7b7b603b0ad2ba9c61ef2355af4a09 100644 (file)
@@ -13,7 +13,8 @@ foreach(policy
     CMP0054
     CMP0056
     CMP0065
-    CMP0075)
+    CMP0075
+    CMP0093)
   if(POLICY ${policy})
     cmake_policy(SET ${policy} NEW)
   endif()
index 946f3f5e71ff5630d6ccbb287567fdc05871439e..ce78d5417b0b8b00360377e00620794e697aea13 100644 (file)
@@ -1,3 +1,7 @@
+if(Boost_VERSION VERSION_GREATER_EQUAL 1.74)
+  add_definitions(-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
+endif()
+
 add_library(rbd_types STATIC
   journal/Types.cc
   mirroring_watcher/Types.cc