Skip to content

Commit 0fb7119

Browse files
committed
Add ba_alloc sources to pool libs
if umf is build as a shared lib. This is needed because ba_alloc symbols are not longer exported from libumf
1 parent c418354 commit 0fb7119

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/pool/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
if(UMF_BUILD_SHARED_LIBRARY)
6+
set(POOL_EXTRA_SRCS ${BA_SOURCES})
7+
endif()
8+
59
# libumf_pool_disjoint
610
if(UMF_BUILD_LIBUMF_POOL_DISJOINT)
711
add_umf_library(NAME disjoint_pool
812
TYPE STATIC
9-
SRCS pool_disjoint.cpp
13+
SRCS pool_disjoint.cpp ${POOL_EXTRA_SRCS}
1014
LIBS umf_utils)
1115

1216
add_library(${PROJECT_NAME}::disjoint_pool ALIAS disjoint_pool)
@@ -34,7 +38,7 @@ if(UMF_BUILD_LIBUMF_POOL_JEMALLOC)
3438
# This is a temporary fix for https://github.com/oneapi-src/unified-memory-framework/issues/161
3539
add_umf_library(NAME jemalloc_pool
3640
TYPE STATIC
37-
SRCS pool_jemalloc.c
41+
SRCS pool_jemalloc.c ${POOL_EXTRA_SRCS}
3842
LIBS c jemalloc umf_utils)
3943
add_library(${PROJECT_NAME}::jemalloc_pool ALIAS jemalloc_pool)
4044
install(TARGETS jemalloc_pool
@@ -50,7 +54,7 @@ if(UMF_BUILD_LIBUMF_POOL_SCALABLE)
5054
if(LINUX)
5155
add_umf_library(NAME scalable_pool
5256
TYPE STATIC
53-
SRCS pool_scalable.c
57+
SRCS pool_scalable.c ${POOL_EXTRA_SRCS}
5458
LIBS dl umf_utils)
5559
add_library(${PROJECT_NAME}::scalable_pool ALIAS scalable_pool)
5660
install(TARGETS scalable_pool

0 commit comments

Comments
 (0)