File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 78
78
cmake
79
79
-B ${{github.workspace}}/build
80
80
-DUMF_FORMAT_CODE_STYLE=ON
81
+ -DUMF_BUILD_OS_MEMORY_PROVIDER=OFF
81
82
82
83
- name : Build
83
84
run : >
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ endforeach()
42
42
include (CTest )
43
43
include (CMakePackageConfigHelpers )
44
44
include (GNUInstallDirs )
45
+ find_package (PkgConfig )
45
46
46
47
list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
47
48
include (helpers )
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 'libhwloc' using find_library()" )
6
+
7
+ find_library (LIBHWLOC_LIBRARY NAMES libhwloc hwloc )
8
+ set (LIBHWLOC_LIBRARIES ${LIBHWLOC_LIBRARY} )
9
+
10
+ if (LIBHWLOC_LIBRARY )
11
+ message (STATUS " Found libhwloc using find_library()" )
12
+ else ()
13
+ set (MSG_NOT_FOUND "libhwloc NOT found (set CMAKE_PREFIX_PATH to point the location)" )
14
+ if (LIBHWLOC_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 @@ -58,8 +58,15 @@ if(UMF_BUILD_OS_MEMORY_PROVIDER)
58
58
provider/provider_os_memory_linux.c
59
59
memory_targets/memory_target_numa.c
60
60
memspaces/memspace_numa.c )
61
+
61
62
if (LINUX )
62
- set (UMF_LIBS ${UMF_LIBS} hwloc )
63
+ if (PkgConfig_FOUND )
64
+ pkg_check_modules (LIBHWLOC hwloc )
65
+ endif ()
66
+ if (NOT LIBHWLOC_FOUND )
67
+ find_package (LIBHWLOC REQUIRED hwloc )
68
+ endif ()
69
+ set (UMF_LIBS ${UMF_LIBS} ${LIBHWLOC_LIBRARIES} )
63
70
endif ()
64
71
endif ()
65
72
You can’t perform that action at this time.
0 commit comments