File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 79
79
-B ${{github.workspace}}/build
80
80
-DUMF_FORMAT_CODE_STYLE=ON
81
81
-DUMF_BUILD_OS_MEMORY_PROVIDER=OFF
82
+ -DUMF_BUILD_TESTS=OFF
82
83
83
84
- name : Build
84
85
run : >
Original file line number Diff line number Diff line change
1
+ # Copyright (C) 2024 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
+ message (STATUS "Checking for module 'libnuma' using find_library()" )
6
+
7
+ find_library (LIBNUMA_LIBRARY NAMES libnuma numa )
8
+ set (LIBNUMA_LIBRARIES ${LIBNUMA_LIBRARY} )
9
+
10
+ if (LIBNUMA_LIBRARY )
11
+ message (STATUS " Found libnuma using find_library()" )
12
+ else ()
13
+ set (MSG_NOT_FOUND "libnuma NOT found (set CMAKE_PREFIX_PATH to point the location)" )
14
+ if (LIBNUMA_FIND_REQUIRED )
15
+ message (FATAL_ERROR ${MSG_NOT_FOUND} )
16
+ else ()
17
+ message (WARNING ${MSG_NOT_FOUND} )
18
+ endif ()
19
+ endif ()
Original file line number Diff line number Diff line change @@ -110,18 +110,25 @@ else()
110
110
endif ()
111
111
112
112
if (UMF_BUILD_OS_MEMORY_PROVIDER AND LINUX ) # OS-specific functions are implemented only for Linux now
113
+ if (PkgConfig_FOUND )
114
+ pkg_check_modules (LIBNUMA numa )
115
+ endif ()
116
+ if (NOT LIBNUMA_FOUND )
117
+ find_package (LIBNUMA REQUIRED numa )
118
+ endif ()
119
+
113
120
add_umf_test (NAME provider_os_memory
114
121
SRCS provider_os_memory.cpp
115
122
LIBS umf_utils )
116
123
add_umf_test (NAME provider_os_memory_multiple_numa_nodes
117
124
SRCS provider_os_memory_multiple_numa_nodes.cpp
118
- LIBS umf_utils numa )
125
+ LIBS umf_utils ${LIBNUMA_LIBRARIES} )
119
126
add_umf_test (NAME memspace_numa
120
127
SRCS memspace_numa.cpp
121
- LIBS numa )
128
+ LIBS ${LIBNUMA_LIBRARIES} )
122
129
add_umf_test (NAME provider_os_memory_config
123
130
SRCS provider_os_memory_config.cpp
124
- LIBS umf_utils numa )
131
+ LIBS umf_utils ${LIBNUMA_LIBRARIES} )
125
132
endif ()
126
133
127
134
if (UMF_BUILD_SHARED_LIBRARY )
You can’t perform that action at this time.
0 commit comments