summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-11-29 22:49:43 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-11-30 11:16:47 +0300
commit910a23c621d8e8ed6a544ba2eb3eb6cd2198a109 (patch)
treed3c48319dd60a4f09788b67b3a26723332421ded /CMakeLists.txt
parenta8b8f493f175eff10d78dc0860ba2c6597356dda (diff)
downloadbdwgc-910a23c621d8e8ed6a544ba2eb3eb6cd2198a109.tar.gz
Do not compile pthread_start.c on Cygwin even if build shared libs (CMake)
* CMakeLists.txt [(enable_single_obj_compilation || BUILD_SHARED_LIBS) && CMAKE_USE_PTHREADS_INIT] (GC_PTHREAD_START_STANDALONE): Do not define C macro if CYGWIN or MSYS. * CMakeLists.txt [(enable_single_obj_compilation || BUILD_SHARED_LIBS) && CMAKE_USE_PTHREADS_INIT] (SRC): Do not add pthread_start.c if CYGWIN or MSYS.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d72f9eb..3f8fde9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -342,10 +342,10 @@ endif(enable_werror)
if (enable_single_obj_compilation OR BUILD_SHARED_LIBS)
set(SRC extra/gc.c) # override SRC
- if (CMAKE_USE_PTHREADS_INIT)
+ if (CMAKE_USE_PTHREADS_INIT AND NOT (CYGWIN OR MSYS))
add_definitions("-DGC_PTHREAD_START_STANDALONE")
set(SRC ${SRC} pthread_start.c)
- endif(CMAKE_USE_PTHREADS_INIT)
+ endif()
elseif (BORLAND)
# Suppress "GC_push_contents_hdr() is declared but never used" warning.
add_compile_options(/w-use)