summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3f8fde9f..192a781c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,6 +180,8 @@ if (CMAKE_USE_PTHREADS_INIT)
set(SRC ${SRC} gc_dlopen.c)
if (CYGWIN OR MSYS)
set(SRC ${SRC} win32_threads.c)
+ elseif (APPLE)
+ set(SRC ${SRC} darwin_stop_world.c pthread_support.c)
else()
set(SRC ${SRC} pthread_start.c pthread_stop_world.c pthread_support.c)
endif()
@@ -208,7 +210,6 @@ if (CMAKE_USE_PTHREADS_INIT)
elseif (APPLE)
# The incremental mode conflicts with fork handling (for now).
# Thus, HANDLE_FORK is not defined.
- set(SRC ${SRC} darwin_stop_world.c)
elseif (enable_handle_fork AND NOT disable_handle_fork)
add_definitions("-DHANDLE_FORK")
endif()
@@ -342,7 +343,7 @@ endif(enable_werror)
if (enable_single_obj_compilation OR BUILD_SHARED_LIBS)
set(SRC extra/gc.c) # override SRC
- if (CMAKE_USE_PTHREADS_INIT AND NOT (CYGWIN OR MSYS))
+ if (CMAKE_USE_PTHREADS_INIT AND NOT (APPLE OR CYGWIN OR MSYS))
add_definitions("-DGC_PTHREAD_START_STANDALONE")
set(SRC ${SRC} pthread_start.c)
endif()