From 62055db25b38f6c11406888a41892e9a65c3ca16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Thu, 29 Jan 2026 12:37:35 +0100 Subject: [PATCH] Fix boehm gc issues --- cmake/FindBoehmGC.cmake | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cmake/FindBoehmGC.cmake b/cmake/FindBoehmGC.cmake index 9a9504ad..45435b49 100644 --- a/cmake/FindBoehmGC.cmake +++ b/cmake/FindBoehmGC.cmake @@ -97,10 +97,14 @@ return 0; endif() endif() else() - find_library( - BoehmGC_LIBRARIES - NAMES gc - HINTS ${PC_BDW_GC_LIBDIR} ${PC_BDW_GC_LIBRARY_DIRS}) + # if not found yet, or file it doesn't exist, try find one + if(NOT BoehmGC_LIBRARIES) + find_library( + BoehmGC_LIBRARIES + NAMES gc + HINTS ${PC_BDW_GC_LIBDIR} ${PC_BDW_GC_LIBRARY_DIRS}) + endif() + # OpenSolaris uses bgc as Boehm GC runtime in its package manager. so try it if(NOT BoehmGC_LIBRARIES) find_library( @@ -121,4 +125,7 @@ mark_as_advanced(BoehmGC_LIBRARIES BoehmGC_INCLUDE_DIR) # for compatibility with older versions of this file if(DEFINED BoehmGC_FOUND) set(BOEHM_GC_FOUND "${BoehmGC_FOUND}") + set(BOEHM_GC_INCLUDE_DIR "${BoehmGC_INCLUDE_DIR}") + set(BOEHM_GC_LIBRARIES "${BoehmGC_LIBRARIES}") + mark_as_advanced(BOEHM_GC_LIBRARIES BOEHM_GC_INCLUDE_DIR) endif()