From fd578f7c5c98d7a5edfbd1ad5f72db6541ddc679 Mon Sep 17 00:00:00 2001 From: Robert Imschweiler Date: Mon, 2 Mar 2026 18:03:36 +0100 Subject: [PATCH] [libomp] Fix hwloc include for non-standard paths (#184087) Fixes https://github.com/llvm/llvm-project/issues/183884 --------- Co-authored-by: Michael Kruse --- openmp/runtime/src/CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 3cbb2543369b..97ffa2991678 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -189,11 +189,17 @@ else() set(LIBOMP_LINKER_LANGUAGE CXX) endif() if(LIBOMP_USE_HWLOC) + # Since we are using an OBJECT library, the PRIVATE and INTERFACE options are split + # (instead of using PUBLIC): obj.omp for compiling itself, omp for propagating + # the options to other libraries that depend on it, e.g. libompd. + target_include_directories(obj.omp + PRIVATE + "$" + "$") target_include_directories(omp - PUBLIC - "$" - "$" - ) + INTERFACE + "$" + "$") endif() if(OPENMP_MSVC_NAME_SCHEME)