File: FindPthreadSetName.cmake

package info (click to toggle)
seastar 25.05.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 7,256 kB
  • sloc: cpp: 89,250; python: 5,066; ansic: 3,452; sh: 1,272; xml: 177; makefile: 9
file content (13 lines) | stat: -rw-r--r-- 406 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
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)