From: Ivan Maidanski Date: Tue, 4 Jun 2019 20:20:43 +0000 (+0300) Subject: Support enable_sigrt_signals option by CMake script X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b8507a988f92907eaa0a264cbe7228bce65adb4;p=gc Support enable_sigrt_signals option by CMake script Issue #281 (bdwgc). * CMakeLists.txt (enable_sigrt_signals): Add option (default to OFF). * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT && enable_sigrt_signals]: Define GC_USESIGRT_SIGNALS macro. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c78b6a1..4fac59d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ option(enable_thread_local_alloc "Turn on thread-local allocation optimization" option(enable_threads_discovery "Enable threads discovery in GC" ON) #TODO Support OPTION(enable_cplusplus "install C++ support" OFF) option(enable_gcj_support "Support for gcj" ON) +option(enable_sigrt_signals "Use SIGRTMIN-based signals for thread suspend/resume" OFF) option(enable_gc_debug "Support for pointer back-tracing" OFF) option(enable_java_finalization "Support for java finalization" ON) option(enable_atomic_uncollectable "Support for atomic uncollectible allocation" ON) @@ -141,6 +142,9 @@ if (CMAKE_USE_PTHREADS_INIT) set(SRC ${SRC} darwin_stop_world.c) #TODO darwin_threads=true endif() + if (enable_sigrt_signals) + add_definitions("-DGC_USESIGRT_SIGNALS") + endif() endif(CMAKE_USE_PTHREADS_INIT) if (CMAKE_USE_WIN32_THREADS_INIT)