https://github.com/Kitware/CMake
Raw File
Tip revision: fab7fe7ef5a5462952297611c1dd668a603e3a36 authored by Brad King on 17 March 2021, 14:16:33 UTC
CMake 3.20.0-rc5
Tip revision: fab7fe7
CheckForPthreads.c
#include <pthread.h>

void* start_routine(void* args)
{
  return args;
}

int main(void)
{
  /* This is a compile and link test, no code to actually run things. */
  pthread_t thread;
  pthread_create(&thread, 0, start_routine, 0);
  pthread_join(thread, 0);
  return 0;
}
back to top