[Openmp-commits] [openmp] [libomp] Fix hwloc include for non-standard paths (PR #184087)
Richard Berger via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 2 07:06:24 PST 2026
================
@@ -189,6 +189,14 @@ else()
set(LIBOMP_LINKER_LANGUAGE CXX)
endif()
if(${LIBOMP_USE_HWLOC})
+ target_include_directories(obj.omp
+ PUBLIC
+ "$<BUILD_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
+ "$<INSTALL_INTERFACE:${LIBOMP_HWLOC_INCLUDE_DIR}>"
+ )
+ # omp itself uses obj.omp and thus doesn't need to include hwloc headers
+ # itself. However, we want to propagate the include to consumers of omp (e.g.
+ # libompd).
----------------
rbberger wrote:
Since you're using CMake 3.20+, I suggest:
```cmake
target_link_libraries(obj.omp PUBLIC ...)
target_link_libraries(omp PUBLIC obj.omp)
```
https://github.com/llvm/llvm-project/pull/184087
More information about the Openmp-commits
mailing list