From: Ivan Maidanski Date: Tue, 31 Jan 2017 23:30:18 +0000 (+0300) Subject: Fix enable_parallel_mark condition in CMake script X-Git-Tag: v7.4.6~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a5dcf88aea4d8f2d67b90588aa8c8d5516262c7;p=gc Fix enable_parallel_mark condition in CMake script * CMakeLists.txt [enable_parallel_mark] (ADD_DEFINITIONS): Add -DPARALLEL_MARK; remove ADD_DEFINITIONS("-DPARALLEL_MARK") in other places; remove ${} for enable_parallel_mark in IF. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 05d398af..846740d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,6 +70,7 @@ OPTION(enable_parallel_mark "Parallelize marking and free list construction" NO) #ENDIF(Threads_FOUND) IF(enable_parallel_mark) + ADD_DEFINITIONS("-DPARALLEL_MARK") ENDIF(enable_parallel_mark) OPTION(enable_cplusplus "install C++ support" NO) @@ -86,9 +87,6 @@ IF(CMAKE_USE_PTHREADS_INIT) IF( HOST MATCHES x86-.*-linux.*|ia64-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha-.*-linux.*|sparc.*-.*-linux.*) ADD_DEFINITIONS("-DGC_LINUX_THREADS") ADD_DEFINITIONS("-D_REENTRANT") - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") - ENDIF() ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) MESSAGE("Explicit GC_INIT() calls may be required.") @@ -105,9 +103,6 @@ IF(CMAKE_USE_PTHREADS_INIT) MESSAGE("Only HP/UX 11 POSIX threads are supported.") ADD_DEFINITIONS("-DGC_HPUX_THREADS") ADD_DEFINITIONS("-D_POSIX_C_SOURCE=199506L") #TODO test -DVAR=value. Alternative is COMPILE_DEFINITIONS property - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") - ENDIF() MESSAGE("Explicit GC_INIT() calls may be required.") ADD_DEFINITIONS("-D_REENTRANT") #TODO ENDIF() @@ -124,9 +119,6 @@ IF(CMAKE_USE_PTHREADS_INIT) IF ( HOST MATCHES .*-.*-kfreebsd.*-gnu) ADD_DEFINITIONS("-DGC_FREEBSD_THREADS") ADD_DEFINITIONS("-D_REENTRANT") - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") - ENDIF() ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") ADD_DEFINITIONS("-DUSE_COMPILER_TLS") SET(SRC ${SRC} thread_local_alloc.c) @@ -159,9 +151,6 @@ IF(CMAKE_USE_PTHREADS_INIT) ENDIF() IF ( HOST MATCHES .*-.*-cygwin.*) ADD_DEFINITIONS("-DGC_THREADS") - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") - ENDIF() ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) #TODO @@ -171,17 +160,13 @@ IF(CMAKE_USE_PTHREADS_INIT) ADD_DEFINITIONS("-DGC_DARWIN_THREADS") ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") MESSAGE("Explicit GC_INIT() calls may be required.") - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") - ENDIF() SET(SRC ${SRC} darwin_stop_world.c thread_local_alloc.c) #TODO #darwin_threads=true ENDIF() IF ( HOST MATCHES .*-.*-osf*) ADD_DEFINITIONS("-DGC_OSF1_THREADS") - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") + IF(enable_parallel_mark) ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) MESSAGE("Explicit GC_INIT() calls may be required.") @@ -198,8 +183,7 @@ ENDIF(CMAKE_USE_PTHREADS_INIT) IF(CMAKE_USE_WIN32_THREADS_INIT) ADD_DEFINITIONS("-DGC_THREADS") #win32_threads=true TODO - IF (${enable_parallel_mark}) - ADD_DEFINITIONS("-DPARALLEL_MARK") + IF(enable_parallel_mark) ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) ENDIF()