[Openmp-commits] [PATCH] D122667: llvm14 patch: hwloc include directory for libompd
John Ericson via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 30 08:04:05 PDT 2022
Ericson2314 added a comment.
$ git grep hwloc.h
openmp/README.rst: ``hwloc.h`` in ``${LIBOMP_HWLOC_INSTALL_DIR}/include`` and the library in
openmp/runtime/cmake/config-ix.cmake: check_include_file(hwloc.h LIBOMP_HAVE_HWLOC_H)
openmp/runtime/src/kmp.h:#include "hwloc.h"
we useful to me.
In openmp/runtime/src/CMakeLists.txt in particular we have
if(${LIBOMP_USE_HWLOC})
include_directories(${LIBOMP_HWLOC_INSTALL_DIR}/include)
endif()
The problem is that `include_directories` just affects the current build, but `hwloc.h` is being included in a *public* header, right?
The solution is to use `target_include_directories` (See https://cmake.org/cmake/help/latest/command/target_include_directories.html) with `PUBLIC` so the include directories are properly propogated downstream.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122667/new/
https://reviews.llvm.org/D122667
More information about the Openmp-commits
mailing list