[llvm-branch-commits] [openmp] 1e5cc36 - [libomp] Backport: Fix hwloc include for non-standard paths (#184087)

Robert Imschweiler via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 5 04:25:07 PST 2026


Author: Robert Imschweiler
Date: 2026-03-03T14:34:58-06:00
New Revision: 1e5cc368ba48f984fc5c85e8e421b19fc8cc33a1

URL: https://github.com/llvm/llvm-project/commit/1e5cc368ba48f984fc5c85e8e421b19fc8cc33a1
DIFF: https://github.com/llvm/llvm-project/commit/1e5cc368ba48f984fc5c85e8e421b19fc8cc33a1.diff

LOG: [libomp] Backport: Fix hwloc include for non-standard paths (#184087)

Fixes https://github.com/llvm/llvm-project/issues/183884

---------

Co-authored-by: Michael Kruse <llvm-project at meinersbur.de>

Added: 
    

Modified: 
    openmp/runtime/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 53f83c006b04f..81fa9f0f2aaf8 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
+    "$<BUILD_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
+    "$<INSTALL_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>")
   target_include_directories(omp
-                             PUBLIC
-			     "$<BUILD_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
-			     "$<INSTALL_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
-  )
+    INTERFACE
+    "$<BUILD_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
+    "$<INSTALL_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>")
 endif()
 
 if(OPENMP_MSVC_NAME_SCHEME)


        


More information about the llvm-branch-commits mailing list