From 1a47f1137367f9c4935e8f8418546cf40df169f7 Mon Sep 17 00:00:00 2001 From: Igor Chorazewicz Date: Fri, 2 Aug 2024 20:59:34 +0000 Subject: [PATCH] Disable opencl, cuda and nvml when configuring hwloc Without explicitly disabling them and if a system where hwloc is being build has opencl/cuda/nvml installed those libraries will become hwloc dependencies which would force umf to link with them. The problem manifested on a system where opencl was installed and umf compilation failed due to missing clGetDevices symbol. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70b99aaf2..e366726fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,7 +173,8 @@ elseif(NOT UMF_DISABLE_HWLOC) COMMAND ./configure --prefix=${hwloc_targ_BINARY_DIR} --enable-static=yes --enable-shared=no --disable-libxml2 --disable-levelzero - CFLAGS=-fPIC CXXFLAGS=-fPIC + --disable-opencl --disable-cuda --disable-nvml CFLAGS=-fPIC + CXXFLAGS=-fPIC WORKING_DIRECTORY ${hwloc_targ_SOURCE_DIR} OUTPUT ${hwloc_targ_SOURCE_DIR}/Makefile DEPENDS ${hwloc_targ_SOURCE_DIR}/configure)