Skip to content

Commit

Permalink
Fix enable_parallel_mark condition in CMake script
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
ivmai committed Feb 6, 2017
1 parent 44d1b98 commit d66bd58
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.")
Expand All @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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.")
Expand All @@ -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()
Expand Down

0 comments on commit d66bd58

Please sign in to comment.