summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMahder Gebremedhin <mahder.gebremedhin@liu.se>2020-10-16 14:52:49 +0200
committerIvan Maidanski <ivmai@mail.ru>2021-08-21 01:04:30 +0300
commit8ec49543956d69f5580ca4709cd7fa47c6ac109b (patch)
treeaf6ce808fe316488aa8783b7939b68e27ecdee5e /CMakeLists.txt
parent31cf568064efcdb80405274bc470da4461f12c70 (diff)
downloadbdwgc-8ec49543956d69f5580ca4709cd7fa47c6ac109b.tar.gz
Fix missing gc_dlopen.c in CMake script
(a cherry-pick of commit af4b03570 from 'master') Issue #336 (bdwgc). The source file gc_dlopen.c is not listed in the SRC variable of the cmake configuration. This leads to undefined references of GC_dlopen when the library is built as a STATIC library. This patch fixes the issue. * CMakeLists.txt [CMAKE_USE_PTHREADS_INIT] (SRC): Add gc_dlopen.c file.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50c7d73b..0d98aaca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,7 +84,8 @@ MESSAGE("HOST = ${HOST}")
# Thread Detection. Relying on cmake for lib and includes.
#TODO check cmake detection
IF(CMAKE_USE_PTHREADS_INIT)
- SET(SRC ${SRC} pthread_start.c pthread_support.c pthread_stop_world.c)
+ SET(SRC ${SRC} gc_dlopen.c pthread_start.c pthread_stop_world.c
+ pthread_support.c)
# Common defines for most POSIX platforms.
IF( HOST MATCHES .*-.*-aix.*|.*-.*-android.*|.*-.*-cygwin.*|.*-.*-darwin.*|.*-.*-.*freebsd.*|.*-.*-haiku.*|.*-.*-gnu.*|.*-.*-hpux11.*|.*-.*-irix.*|.*-.*-.*linux.*|.*-.*-msys.*|.*-.*-nacl.*|.*-.*-netbsd.*|.*-.*-openbsd.*|.*-.*-osf.*|.*-.*-solaris.*)
ADD_DEFINITIONS("-DGC_THREADS -D_REENTRANT")