cmake: tsan
[m6w6/libmemcached] / test / CMakeLists.txt
index 449223f0efd3fb62379cf48f7a8e5d24551e9733..e2ecf0a27a2b1aa283a423a78c4999518db98d8b 100644 (file)
@@ -14,9 +14,14 @@ endif()
 check_decl(pipe2 unistd.h)
 check_decl(SOCK_NONBLOCK sys/socket.h)
 check_decl(SOCK_CLOEXEC sys/socket.h)
+check_decl(waitid sys/wait.h)
+if(HAVE_WAITID)
+    check_compiles(HAVE_WAITID_NOWAIT "siginfo_t s; waitid(P_ALL, 0, &s, WNOWAIT|WEXITED);" sys/types.h sys/wait.h)
+endif()
 
 file(GLOB_RECURSE TESTING_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 set(TESTING_ROOT ${CMAKE_CURRENT_BINARY_DIR})
+set(SOURCES_ROOT ${CMAKE_SOURCE_DIR})
 set_source_files_properties(main.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
 configure_file(conf.h.in conf.h @ONLY)
 add_executable(runtests ${TESTING_SRC})