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
CMP0054
CMP0056
CMP0065
- CMP0075)
+ CMP0075
+ CMP0093)
if(POLICY ${policy})
cmake_policy(SET ${policy} NEW)
endif()
+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