Skip to content

Commit f870e68

Browse files
committed
a
1 parent 4a93eeb commit f870e68

File tree

15 files changed

+163
-196
lines changed

15 files changed

+163
-196
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,12 +953,12 @@ if(UMF_FORMAT_CODE_STYLE)
953953
COMMENT "Format C/C++, CMake, and Python files")
954954
message(
955955
STATUS
956-
" Adding convenience targets 'format-check' and 'format-apply'."
956+
"Adding convenience targets 'format-check' and 'format-apply'."
957957
)
958958
else()
959959
message(
960960
STATUS
961-
" Convenience targets 'format-check' and 'format-apply' are "
961+
"Convenience targets 'format-check' and 'format-apply' are "
962962
"not available. Use commands specific for found tools (see the log above)."
963963
)
964964
endif()

cmake/FindCUDA.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ else()
3434
if(CUDA_FIND_REQUIRED)
3535
message(FATAL_ERROR ${MSG_NOT_FOUND})
3636
else()
37-
message(WARNING ${MSG_NOT_FOUND})
37+
message(STATUS ${MSG_NOT_FOUND})
3838
endif()
3939
endif()

cmake/FindJEMALLOC.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else()
2323
if(JEMALLOC_FIND_REQUIRED)
2424
message(FATAL_ERROR ${MSG_NOT_FOUND})
2525
else()
26-
message(WARNING ${MSG_NOT_FOUND})
26+
message(STATUS ${MSG_NOT_FOUND})
2727
endif()
2828
endif()
2929

@@ -41,6 +41,6 @@ else()
4141
if(JEMALLOC_FIND_REQUIRED)
4242
message(FATAL_ERROR ${MSG_NOT_FOUND})
4343
else()
44-
message(WARNING ${MSG_NOT_FOUND})
44+
message(STATUS ${MSG_NOT_FOUND})
4545
endif()
4646
endif()

cmake/FindLIBHWLOC.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ else()
7676
if(LIBHWLOC_FIND_REQUIRED)
7777
message(FATAL_ERROR ${MSG_NOT_FOUND})
7878
else()
79-
message(WARNING ${MSG_NOT_FOUND})
79+
message(STATUS ${MSG_NOT_FOUND})
8080
endif()
8181
endif()

cmake/FindLIBNUMA.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ else()
1515
if(LIBNUMA_FIND_REQUIRED)
1616
message(FATAL_ERROR ${MSG_NOT_FOUND})
1717
else()
18-
message(WARNING ${MSG_NOT_FOUND})
18+
message(STATUS ${MSG_NOT_FOUND})
1919
endif()
2020
endif()

cmake/FindTBB.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ else()
2121
if(TBB_FIND_REQUIRED)
2222
message(FATAL_ERROR ${MSG_NOT_FOUND})
2323
else()
24-
message(WARNING ${MSG_NOT_FOUND})
24+
message(STATUS ${MSG_NOT_FOUND})
2525
endif()
2626
endif()
2727

cmake/FindZE_LOADER.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ else()
3434
if(ZE_LOADER_FIND_REQUIRED)
3535
message(FATAL_ERROR ${MSG_NOT_FOUND})
3636
else()
37-
message(WARNING ${MSG_NOT_FOUND})
37+
message(STATUS ${MSG_NOT_FOUND})
3838
endif()
3939
endif()

cmake/helpers.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ function(add_umf_library)
386386
target_include_directories(
387387
${ARG_NAME}
388388
PRIVATE ${UMF_CMAKE_SOURCE_DIR}/include
389+
${UMF_CMAKE_SOURCE_DIR}/src
389390
${UMF_CMAKE_SOURCE_DIR}/src/utils
390391
${UMF_CMAKE_SOURCE_DIR}/src/base_alloc
391392
${UMF_CMAKE_SOURCE_DIR}/src/coarse)

src/CMakeLists.txt

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,16 @@ set(UMF_COMMON_COMPILE_DEFINITIONS
3030
${UMF_COMMON_COMPILE_DEFINITIONS} UMF_VERSION=${UMF_VERSION}
3131
UMF_ALL_CMAKE_VARIABLES="${UMF_ALL_CMAKE_VARIABLES}")
3232

33-
set(BA_SOURCES
34-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc.c
35-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc_linear.c
36-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc_global.c)
37-
3833
add_subdirectory(utils)
34+
add_subdirectory(base_alloc)
3935
add_subdirectory(coarse)
4036

41-
set(UMF_LIBS $<BUILD_INTERFACE:umf_utils> $<BUILD_INTERFACE:coarse>)
42-
43-
set(CTL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ctl/ctl.c)
44-
45-
if(LINUX)
46-
set(BA_SOURCES ${BA_SOURCES}
47-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc_linux.c)
48-
elseif(WINDOWS)
49-
set(BA_SOURCES ${BA_SOURCES}
50-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc_windows.c)
51-
elseif(MACOSX)
52-
set(BA_SOURCES ${BA_SOURCES}
53-
${CMAKE_CURRENT_SOURCE_DIR}/base_alloc/base_alloc_linux.c)
54-
endif()
55-
56-
set(BA_SOURCES
57-
${BA_SOURCES}
58-
PARENT_SCOPE)
37+
set(UMF_LIBS umf_utils umf_ba coarse)
5938

6039
set(HWLOC_DEPENDENT_SOURCES topology.c)
6140

6241
set(UMF_SOURCES
63-
${BA_SOURCES}
64-
${CTL_SOURCES}
42+
ctl/ctl.c
6543
libumf.c
6644
ipc.c
6745
ipc_cache.c
@@ -179,6 +157,7 @@ target_link_directories(umf PRIVATE ${UMF_PRIVATE_LIBRARY_DIRS})
179157
target_compile_definitions(umf PRIVATE ${UMF_COMMON_COMPILE_DEFINITIONS})
180158

181159
add_dependencies(umf coarse)
160+
add_dependencies(umf umf_ba)
182161

183162
if(UMF_LINK_HWLOC_STATICALLY)
184163
add_dependencies(umf ${UMF_HWLOC_NAME})
@@ -228,8 +207,6 @@ target_include_directories(
228207

229208
install(TARGETS umf EXPORT ${PROJECT_NAME}-targets)
230209

231-
add_subdirectory(pool)
232-
233210
if(UMF_PROXY_LIB_ENABLED)
234211
add_subdirectory(proxy_lib)
235212
endif()

src/base_alloc/CMakeLists.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
5+
include(${UMF_CMAKE_SOURCE_DIR}/cmake/helpers.cmake)
6+
7+
set(UMF_BA_SOURCES_COMMON base_alloc_global.c base_alloc.c base_alloc_linear.c)
8+
set(UMF_BA_SOURCES_LINUX base_alloc_linux.c)
9+
set(UMF_BA_SOURCES_WINDOWS base_alloc_windows.c)
10+
11+
if(LINUX OR MACOSX)
12+
set(UMF_BA_SOURCES ${UMF_BA_SOURCES_COMMON} ${UMF_BA_SOURCES_LINUX})
13+
elseif(WINDOWS)
14+
set(UMF_BA_SOURCES ${UMF_BA_SOURCES_COMMON} ${UMF_BA_SOURCES_WINDOWS})
15+
endif()
16+
17+
add_umf_library(
18+
NAME umf_ba
19+
TYPE STATIC
20+
SRCS ${UMF_BA_SOURCES}
21+
LIBS umf_utils)
22+
23+
target_include_directories(umf_ba
24+
PRIVATE ${UMF_CMAKE_SOURCE_DIR}/src/base_alloc)
25+
26+
if(NOT UMF_BUILD_SHARED_LIBRARY)
27+
install(TARGETS umf_ba EXPORT ${PROJECT_NAME}-targets)
28+
endif()

0 commit comments

Comments
 (0)