agent-enviroments/builder/libs/seastar/cmake/FindPthreadSetName.cmake
2024-09-10 17:06:08 +03:00

14 lines
406 B
CMake

include (CheckSymbolExists)
include (CMakePushCheckState)
cmake_push_check_state (RESET)
set (CMAKE_REQUIRED_FLAGS "-pthread")
set (CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
check_symbol_exists (pthread_setname_np pthread.h HAVE_PTHREAD_SETNAME_NP)
cmake_pop_check_state ()
find_package_handle_standard_args (PthreadSetName
FOUND_VAR PthreadSetName_FOUND
REQUIRED_VARS
HAVE_PTHREAD_SETNAME_NP)