https://github.com/Kitware/CMake
Raw File
Tip revision: 8738eba336d0f89cd3c183fe32413283abe9140d authored by Brad King on 31 May 2018, 13:04:20 UTC
CMake 3.11.3
Tip revision: 8738eba
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