diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9b4b3f0f5..36955ddc0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -180,7 +180,7 @@ target_compile_definitions(umf PRIVATE ${UMF_COMMON_COMPILE_DEFINITIONS}) add_dependencies(umf coarse) -if(UMF_LINK_HWLOC_STATICALLY) +if(NOT UMF_DISABLE_HWLOC AND UMF_LINK_HWLOC_STATICALLY) add_dependencies(umf ${UMF_HWLOC_NAME}) # On Darwin, link with the IOKit and Foundation frameworks, if they are # available in the system. This is to comply with hwloc which links these,