libmemcached: add MEMCACHED_BEHAVIOR_META_PROTOCOL
[m6w6/libmemcached] / CMake / CheckTbb.cmake
1
2 configure_define(HAVE_TBB)
3
4 # TBBConfig only sets TBB_FOUND to FALSE
5 check_dependency(LIBTBB tbb)
6
7 if(HAVE_LIBTBB)
8
9 cmake_push_check_state()
10 get_property(LIBTBB_INCLUDEDIR TARGET ${LIBTBB} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
11 get_property(LIBTBB_LIBRARIES TARGET ${LIBTBB} PROPERTY INTERFACE_LINK_LIBRARIES)
12 set(CMAKE_REQUIRED_INCLUDES "${LIBTBB_INCLUDEDIR}")
13 set(CMAKE_REQUIRED_LIBRARIES "${LIBTBB_LIBRARIES}")
14 set(CMAKE_REQUIRED_FLAGS -std=c++17)
15
16 check_cxx_include(execution -std=c++17)
17 if(HAVE_EXECUTION)
18 check_cxx_source_compiles("
19 #include <vector>
20 #include <algorithm>
21 #include <execution>
22 int main() {
23 std::vector<char> a = {1,2,3};
24 std::all_of(std::execution::par, a.begin(), a.end(), [](char i) {
25 return i>0;
26 });
27 }
28 "
29 HAVE_TBB
30 )
31
32 endif()
33 cmake_pop_check_state()
34 endif()