diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2021-07-25 23:40:37 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-07-25 23:40:37 +0300 |
commit | abf191cbf9a6d7608ee6afa3b8b900c06f2f047b (patch) | |
tree | e893954c9ffa82921dbc91d6357aca1ca562eb55 /CMakeLists.txt | |
parent | b1cf353d57f27a39b67bea7826e8891b5a0a01a8 (diff) | |
download | bdwgc-abf191cbf9a6d7608ee6afa3b8b900c06f2f047b.tar.gz |
Do not compile pthread_*.c files in Cygwin or MSYS (CMake)
* CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (SRC): Do not add
pthread_start.c, pthread_stop_world.c, pthread_support.c if CYGWIN
or MSYS.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 40d1403c..1aa0c4b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -163,8 +163,12 @@ set(ATOMIC_OPS_LIBS "") # TODO: Assume libatomic_ops library is not needed. # Thread support detection. if (CMAKE_USE_PTHREADS_INIT) - set(SRC ${SRC} gc_dlopen.c pthread_start.c pthread_stop_world.c - pthread_support.c) + set(SRC ${SRC} gc_dlopen.c) + if (CYGWIN OR MSYS) + set(SRC ${SRC} win32_threads.c) + else() + set(SRC ${SRC} pthread_start.c pthread_stop_world.c pthread_support.c) + endif() if (HOST MATCHES .*-.*-hpux10.*) message(FATAL_ERROR "HP/UX 10 POSIX threads are not supported.") endif() @@ -203,9 +207,6 @@ if (CMAKE_USE_PTHREADS_INIT) if (enable_sigrt_signals) add_definitions("-DGC_USESIGRT_SIGNALS") endif() - if (CYGWIN OR MSYS) - set(SRC ${SRC} win32_threads.c) - endif() elseif (CMAKE_USE_WIN32_THREADS_INIT) add_definitions("-DGC_THREADS") if (enable_parallel_mark) |