cmake HAVE_PTHREAD_SETNAME_NP_WITH_TID examples

vectorgraphics/asymptote gc/CMakeLists.txt :532

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\"); return 0; }"
        HAVE_PTHREAD_SETNAME_NP_WITH_TID)

vectorgraphics/asymptote gc/CMakeLists.txt :540

add_definitions("-DHAVE_PTHREAD_SETNAME_NP_WITH_TID")

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

check_c_source_compiles(
      "#define _GNU_SOURCE
       #include <pthread.h>\nint main()
       { pthread_setname_np(0, \"myname\"); return 0;
       }"
      HAVE_PTHREAD_SETNAME_NP_WITH_TID)