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

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

---------

Co-authored-by: Michael Kruse <llvm-project@meinersbur.de>
This commit is contained in:
Robert Imschweiler 2026-03-02 18:03:36 +01:00 committed by GitHub
parent 41fc9b9845
commit fd578f7c5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)