]> granicus.if.org Git - gc/commitdiff
Fix GCJ support in CMake build script
authorIvan Maidanski <ivmai@mail.ru>
Wed, 25 Jan 2017 20:52:53 +0000 (23:52 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 17:16:03 +0000 (20:16 +0300)
* CMakeLists.txt [enable_gcj_support] (SRC): Add gcj_mlc.c.
* CMakeLists.txt [enable_gcj_support] (ADD_DEFINITIONS):
Add -DGC_ENABLE_SUSPEND_THREAD only if enable_threads.

CMakeLists.txt

index 4b33ab2f8382c5ae9249daa04b6fe098ff1d28c4..0539c397c5ae6a58503bbccff12ea44b6bc7dc5c 100644 (file)
@@ -205,7 +205,10 @@ ENDIF(CMAKE_USE_WIN32_THREADS_INIT)
 OPTION(enable_gcj_support "Support for gcj" NO)
 IF(enable_gcj_support)
         ADD_DEFINITIONS("-DGC_GCJ_SUPPORT")
-        ADD_DEFINITIONS("-DGC_ENABLE_SUSPEND_THREAD")
+        IF(enable_threads)
+                ADD_DEFINITIONS("-DGC_ENABLE_SUSPEND_THREAD")
+        ENDIF(enable_threads)
+        SET(SRC ${SRC} gcj_mlc.c)
 ENDIF(enable_gcj_support)