File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1212
1313include ("GenericFindDependency" )
1414
15+ # asio-grpc has some logic to conditionally enable boost containers, this
16+ # should just be defaulted to false since the standard library offers the same
17+ # functionality.
18+ option (ASIO_GRPC_USE_BOOST_CONTAINER "(deprecated) Use Boost.Container instead of <memory_resource>" false )
19+
1520GenericFindDependency(
1621 TARGET asio-grpc::asio-grpc-standalone-asio
1722 SOURCE_DIR asio-grpc
1823 SYSTEM_INCLUDES
1924)
25+
26+ # Older libc++ versions like the one that ships with clang < v16 doesn't offer
27+ # the "memory_resource" standard header which is used by the library, instead
28+ # we conditionally select it to use "experimental/memory_resource" which is
29+ # available. The conditional selection is done via a customer preprocessor
30+ # which we've (Swift Navigation) introduced.
31+ include (CheckExperimentalMemoryResource)
32+ check_experimental_memory_resource(IS_EXPERIMENTAL_MEMORY_RESOURCE)
33+ if (IS_EXPERIMENTAL_MEMORY_RESOURCE)
34+ target_compile_definitions (asio-grpc-standalone-asio
35+ INTERFACE
36+ SWIFTNAV_EXPERIMENTAL_MEMORY_RESOURCE
37+ )
38+ endif ()
39+
40+ # asio-grpc uses language features that are removed in c++20, the libc++
41+ # implementation actually removed these features unless you set a special
42+ # macro.
43+ include (CheckLibcpp)
44+ check_libcpp(IS_LIBCPP)
45+ if (IS_LIBCPP)
46+ target_compile_definitions (asio-grpc-standalone-asio
47+ INTERFACE
48+ _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
49+ )
50+ endif ()
You can’t perform that action at this time.
0 commit comments