https://github.com/Kitware/CMake
Raw File
Tip revision: 7700df9b1ef66761cad08cfc08344d5b27660e9f authored by Brad King on 22 April 2019, 11:42:52 UTC
CMake 3.14.3
Tip revision: 7700df9
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