cmake HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG examples

vectorgraphics/asymptote gc/CMakeLists.txt :522

check_c_source_compiles("
#define _GNU_SOURCE 1\n
#include <pthread.h>\n
int main(void) {\n
  (void)pthread_setname_np(pthread_self(), \"thread-name-%u\", 0); return 0; }"
      HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG)

vectorgraphics/asymptote gc/CMakeLists.txt :530

add_definitions("-DHAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG")

vectorgraphics/asymptote gc/CMakeLists.txt :542

endif(HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG)

SWI-Prolog/swipl-devel cmake/Config.cmake :328

check_c_source_compiles(
      "#define _GNU_SOURCE
       #include <pthread.h>
       int main()
       { pthread_setname_np(0, \"%s\", (void *)\"myname\"); return 0;
       }"
      HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG)

SWI-Prolog/swipl-devel cmake/Config.cmake :338

elseif(HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG)