https://github.com/Kitware/CMake
Raw File
Tip revision: 4c82f309c59d02899145bc25c0e9efc91a6f64ed authored by Brad King on 10 April 2020, 11:37:32 UTC
CMake 3.16.6
Tip revision: 4c82f30
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