Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,13 @@ else()
jemalloc INTERFACE ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a)
add_dependencies(jemalloc jemalloc_prod)

set(JEMALLOC_FOUND TRUE)
set(JEMALLOC_LIBRARY_DIRS ${jemalloc_targ_BINARY_DIR}/lib)
set(JEMALLOC_INCLUDE_DIRS ${jemalloc_targ_BINARY_DIR}/include)
set(JEMALLOC_LIBRARIES ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a)
endif()

if(JEMALLOC_FOUND OR JEMALLOC_LIBRARIES)
if(JEMALLOC_FOUND)
set(UMF_POOL_JEMALLOC_ENABLED TRUE)
# add PATH to DLL on Windows
set(DLL_PATH_LIST
Expand All @@ -263,12 +264,9 @@ if(NOT UMF_DISABLE_HWLOC AND (NOT UMF_LINK_HWLOC_STATICALLY))
pkg_check_modules(LIBHWLOC hwloc>=2.3.0)
if(NOT LIBHWLOC_FOUND)
find_package(LIBHWLOC 2.3.0 COMPONENTS hwloc)
if(LIBHWLOC_LIBRARIES)
set(LIBHWLOC_AVAILABLE TRUE)
endif()
endif()

if(LIBHWLOC_AVAILABLE OR LIBHWLOC_FOUND)
if(LIBHWLOC_FOUND)
# add PATH to DLL on Windows
set(DLL_PATH_LIST
"${DLL_PATH_LIST};PATH=path_list_append:${LIBHWLOC_DLL_DIRS}")
Expand Down Expand Up @@ -327,6 +325,7 @@ else()
DIRECTORY)
set(LIBHWLOC_LIBRARIES ${HWLOC_LIB_PATH})
set(LIBHWLOC_INCLUDE_DIRS ${hwloc_targ_BINARY_DIR}/include)
set(LIBHWLOC_FOUND TRUE)
else() # not Windows
FetchContent_Declare(
hwloc_targ
Expand Down Expand Up @@ -369,6 +368,7 @@ else()
set(LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR}/lib)
set(LIBHWLOC_INCLUDE_DIRS ${hwloc_targ_BINARY_DIR}/include)
set(LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR}/lib/libhwloc.a)
set(LIBHWLOC_FOUND TRUE)
endif()
endif() # UMF_LINK_HWLOC_STATICALLY

Expand Down Expand Up @@ -444,7 +444,7 @@ if(UMF_BUILD_LEVEL_ZERO_PROVIDER)
endif()
message(STATUS "LEVEL_ZERO_INCLUDE_DIRS = ${LEVEL_ZERO_INCLUDE_DIRS}")

if(ZE_LOADER_LIBRARIES)
if(ZE_LOADER_FOUND)
set(UMF_LEVEL_ZERO_ENABLED TRUE)
else()
message(
Expand Down Expand Up @@ -500,7 +500,7 @@ if(UMF_BUILD_CUDA_PROVIDER)
endif()
message(STATUS "CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")

if(CUDA_LIBRARIES)
if(CUDA_FOUND)
set(UMF_CUDA_ENABLED TRUE)
else()
message(
Expand Down Expand Up @@ -722,7 +722,7 @@ pkg_check_modules(TBB tbb)
if(NOT TBB_FOUND)
find_package(TBB OPTIONAL_COMPONENTS tbb)
endif()
if(TBB_FOUND OR TBB_LIBRARY_DIRS)
if(TBB_FOUND)
# add PATH to DLL on Windows
set(DLL_PATH_LIST "${DLL_PATH_LIST};PATH=path_list_append:${TBB_DLL_DIRS}")
set(UMF_POOL_SCALABLE_ENABLED TRUE)
Expand Down
1 change: 1 addition & 0 deletions cmake/FindCUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if(WINDOWS)
endif()

if(CUDA_LIBRARY)
set(CUDA_FOUND TRUE)
message(STATUS " Found cuda using find_library()")
message(STATUS " CUDA_LIBRARIES = ${CUDA_LIBRARIES}")
message(STATUS " CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")
Expand Down
1 change: 1 addition & 0 deletions cmake/FindJEMALLOC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if(WINDOWS)
endif()

if(JEMALLOC_LIBRARY)
set(JEMALLOC_FOUND TRUE)
message(STATUS " Found jemalloc using find_library()")
else()
set(MSG_NOT_FOUND
Expand Down
1 change: 1 addition & 0 deletions cmake/FindLIBHWLOC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ if(WINDOWS)
endif()

if(LIBHWLOC_LIBRARY)
set(LIBHWLOC_FOUND TRUE)
message(STATUS " Found libhwloc: ${LIBHWLOC_LIBRARY}")

if(LIBHWLOC_FIND_VERSION)
Expand Down
1 change: 1 addition & 0 deletions cmake/FindLIBNUMA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ find_library(LIBNUMA_LIBRARY NAMES libnuma numa)
set(LIBNUMA_LIBRARIES ${LIBNUMA_LIBRARY})

if(LIBNUMA_LIBRARY)
set(LIBNUMA_FOUND TRUE)
message(STATUS " Found libnuma using find_library()")
else()
set(MSG_NOT_FOUND
Expand Down
1 change: 1 addition & 0 deletions cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ if(WINDOWS)
endif()

if(TBB_LIBRARY)
set(TBB_FOUND TRUE)
message(STATUS " Found tbb using find_library()")
message(STATUS " TBB_LIBRARIES = ${TBB_LIBRARIES}")
message(STATUS " TBB_INCLUDE_DIRS = ${TBB_INCLUDE_DIRS}")
Expand Down
1 change: 1 addition & 0 deletions cmake/FindZE_LOADER.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if(WINDOWS)
endif()

if(ZE_LOADER_LIBRARY)
set(ZE_LOADER_FOUND TRUE)
message(STATUS " Found ZE_LOADER using find_library()")
message(STATUS " ZE_LOADER_LIBRARIES = ${ZE_LOADER_LIBRARIES}")
message(STATUS " ZE_LOADER_INCLUDE_DIRS = ${ZE_LOADER_INCLUDE_DIRS}")
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindCUDA.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand All @@ -17,6 +17,7 @@ if(WINDOWS)
endif()

if(CUDA_LIBRARY)
set(CUDA_FOUND TRUE)
message(STATUS " Found cuda using find_library()")
message(STATUS " CUDA_LIBRARIES = ${CUDA_LIBRARIES}")
message(STATUS " CUDA_INCLUDE_DIRS = ${CUDA_INCLUDE_DIRS}")
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindJEMALLOC.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand Down Expand Up @@ -36,6 +36,7 @@ if(WINDOWS)
endif()

if(JEMALLOC_LIBRARY)
set(JEMALLOC_FOUND TRUE)
message(STATUS " Found jemalloc using find_library()")
message(STATUS " JEMALLOC_LIBRARIES = ${JEMALLOC_LIBRARIES}")
message(STATUS " JEMALLOC_INCLUDE_DIRS = ${JEMALLOC_INCLUDE_DIRS}")
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindLIBHWLOC.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand Down Expand Up @@ -45,6 +45,7 @@ if(WINDOWS)
endif()

if(LIBHWLOC_LIBRARY)
set(LIBHWLOC_FOUND TRUE)
message(STATUS " Found libhwloc using find_library()")
message(STATUS " LIBHWLOC_LIBRARIES = ${LIBHWLOC_LIBRARIES}")
message(STATUS " LIBHWLOC_INCLUDE_DIRS = ${LIBHWLOC_INCLUDE_DIRS}")
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindLIBNUMA.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand All @@ -8,6 +8,7 @@ find_library(LIBNUMA_LIBRARY NAMES libnuma numa)
set(LIBNUMA_LIBRARIES ${LIBNUMA_LIBRARY})

if(LIBNUMA_LIBRARY)
set(LIBNUMA_FOUND TRUE)
message(STATUS " Found libnuma using find_library()")
else()
set(MSG_NOT_FOUND
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindLIBUMF.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand All @@ -15,6 +15,7 @@ get_filename_component(LIBUMF_INCLUDE_DIR ${LIBUMF_HEADER} DIRECTORY)
set(LIBUMF_INCLUDE_DIRS ${LIBUMF_INCLUDE_DIR})

if(LIBUMF_LIBRARY)
set(LIBUMF_FOUND TRUE)
message(STATUS " Found libumf using find_library()")
message(STATUS " LIBUMF_LIBRARIES = ${LIBUMF_LIBRARIES}")
message(STATUS " LIBUMF_INCLUDE_DIRS = ${LIBUMF_INCLUDE_DIRS}")
Expand Down
3 changes: 2 additions & 1 deletion examples/cmake/FindTBB.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# Copyright (C) 2024-2025 Intel Corporation
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand Down Expand Up @@ -32,6 +32,7 @@ if(WINDOWS)
endif()

if(TBB_LIBRARY)
set(TBB_FOUND TRUE)
message(STATUS " Found tbb using find_library()")
message(STATUS " TBB_LIBRARIES = ${TBB_LIBRARIES}")
message(STATUS " TBB_INCLUDE_DIRS = ${TBB_INCLUDE_DIRS}")
Expand Down
1 change: 1 addition & 0 deletions examples/cmake/FindZE_LOADER.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if(WINDOWS)
endif()

if(ZE_LOADER_LIBRARY)
set(ZE_LOADER_FOUND TRUE)
message(STATUS " Found ZE_LOADER using find_library()")
message(STATUS " ZE_LOADER_LIBRARIES = ${ZE_LOADER_LIBRARIES}")
message(STATUS " ZE_LOADER_INCLUDE_DIRS = ${ZE_LOADER_INCLUDE_DIRS}")
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ if(LINUX
)
endif()

if(LIBNUMA_LIBRARIES)
if(LIBNUMA_FOUND)
set(EXAMPLES ${EXAMPLES} memspace_hmat memspace_numa)
else()
message(
Expand Down