mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 05:20:34 +00:00
d4e551a90b
Use `try_compile` instead of `try_run`. It is not clear why `try_run` was ever needed, and it does not work during cross-compiling. Update the check's source file to remove code associated with actually running things. Also remove the ancient `__CLASSIC_C__` code path and use a simple `int main(void)` as in `Modules/CheckIncludeFile.c.in`. Fixes: #16920
16 lines
273 B
C
16 lines
273 B
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;
|
|
}
|