Skip to content

Commit 62055db

Browse files
committed
Fix boehm gc issues
1 parent 7181330 commit 62055db

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

cmake/FindBoehmGC.cmake

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,14 @@ return 0;
9797
endif()
9898
endif()
9999
else()
100-
find_library(
101-
BoehmGC_LIBRARIES
102-
NAMES gc
103-
HINTS ${PC_BDW_GC_LIBDIR} ${PC_BDW_GC_LIBRARY_DIRS})
100+
# if not found yet, or file it doesn't exist, try find one
101+
if(NOT BoehmGC_LIBRARIES)
102+
find_library(
103+
BoehmGC_LIBRARIES
104+
NAMES gc
105+
HINTS ${PC_BDW_GC_LIBDIR} ${PC_BDW_GC_LIBRARY_DIRS})
106+
endif()
107+
104108
# OpenSolaris uses bgc as Boehm GC runtime in its package manager. so try it
105109
if(NOT BoehmGC_LIBRARIES)
106110
find_library(
@@ -121,4 +125,7 @@ mark_as_advanced(BoehmGC_LIBRARIES BoehmGC_INCLUDE_DIR)
121125
# for compatibility with older versions of this file
122126
if(DEFINED BoehmGC_FOUND)
123127
set(BOEHM_GC_FOUND "${BoehmGC_FOUND}")
128+
set(BOEHM_GC_INCLUDE_DIR "${BoehmGC_INCLUDE_DIR}")
129+
set(BOEHM_GC_LIBRARIES "${BoehmGC_LIBRARIES}")
130+
mark_as_advanced(BOEHM_GC_LIBRARIES BOEHM_GC_INCLUDE_DIR)
124131
endif()

0 commit comments

Comments
 (0)