]> granicus.if.org Git - gc/commitdiff
Fix enable_parallel_mark condition in CMake script
authorIvan Maidanski <ivmai@mail.ru>
Tue, 31 Jan 2017 23:30:18 +0000 (02:30 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 19:03:00 +0000 (22:03 +0300)
* 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.

CMakeLists.txt

index 05d398afad5a477ae30a9e864725d48663fe8601..846740d6e55339b90acaca4fded04c31e5bb3bef 100644 (file)
@@ -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()