check_decl(pipe2 unistd.h)
check_decl(SOCK_NONBLOCK sys/socket.h)
check_decl(SOCK_CLOEXEC sys/socket.h)
+
check_header(execution)
+# TBBConfig only sets TBB_FOUND to FALSE
+set(TBB_FOUND TRUE)
+set(TBB_FIND_RELEASE_ONLY TRUE)
+find_package(TBB)
+
file(GLOB_RECURSE TESTING_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
set(TESTING_ROOT ${CMAKE_CURRENT_BINARY_DIR})
set_source_files_properties(main.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src)
target_link_libraries(runtests PRIVATE libhashkit libmemcachedinternal libmemcachedutil)
+if(TBB_FOUND AND HAVE_EXECUTION)
+ target_link_libraries(runtests PRIVATE TBB::tbb)
+else()
+ set(HAVE_EXECUTION 0)
+endif()
add_dependencies(runtests ${CLIENTS})
if(HAVE_MEMASLAP)
add_dependencies(runtests memaslap)
#include "Retry.hpp"
#include <algorithm>
+#if HAVE_EXECUTION
+# include <execution>
+#endif
#include <sys/wait.h>
Cluster::Cluster(Server serv, size_t cnt)
#if HAVE_EXECUTION
execution::par,
#endif
- cluster.cbegin(), cluster.cend(), [](const Server &s) {
+ cluster.begin(), cluster.end(), [](const Server &s) {
return s.isListening();
});
}