diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-09-14 06:43:18 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-09-14 06:43:18 +0300 |
commit | 48bfbe56e3d6fed11e5a7d144a82a107717bbb6c (patch) | |
tree | a000d29bc0e2e21c22aa3483d4e669908614afa8 /CMakeLists.txt | |
parent | 5d48bfc0488c9daf85f5c3bc09de607c700817a6 (diff) | |
download | bdwgc-48bfbe56e3d6fed11e5a7d144a82a107717bbb6c.tar.gz |
Support disable_single_obj_compilation option in cmake script
This works similar to configure --disable-single-obj-compilation.
Has effect only if building the shared libraries.
* CMakeLists.txt (disable_single_obj_compilation): New option.
* CMakeLists.txt [BUILD_SHARED_LIBS] (SRC): Do not override with
"extra/gc.c" value if disable_single_obj_compilation.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b567a7a5..c2fc136a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ option(enable_register_main_static_data "Perform the initial guess of data root option(enable_checksums "Report erroneously cleared dirty bits" OFF) option(enable_werror "Pass -Werror to the C compiler (treat warnings as errors)" OFF) option(enable_single_obj_compilation "Compile all libgc source files into single .o" OFF) +option(disable_single_obj_compilation "Compile each libgc source file independently" OFF) option(enable_handle_fork "Attempt to ensure a usable collector after fork()" ON) option(disable_handle_fork "Prohibit installation of pthread_atfork() handlers" OFF) option(install_headers "Install header and pkg-config metadata files" ON) @@ -395,7 +396,7 @@ if (enable_werror) endif() endif(enable_werror) -if (enable_single_obj_compilation OR BUILD_SHARED_LIBS) +if (enable_single_obj_compilation OR (BUILD_SHARED_LIBS AND NOT disable_single_obj_compilation)) set(SRC extra/gc.c) # override SRC if (CMAKE_USE_PTHREADS_INIT AND NOT (APPLE OR CYGWIN OR MSYS)) add_definitions("-DGC_PTHREAD_START_STANDALONE") |