[Openmp-commits] [PATCH] D123888: [Clang][OpenMP] libompd: get libomp hwloc includedir by target_link_libraries

Ye Luo via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Apr 15 19:42:58 PDT 2022


ye-luo requested changes to this revision.
ye-luo added inline comments.
This revision now requires changes to proceed.


================
Comment at: openmp/runtime/src/CMakeLists.txt:158
+if(${LIBOMP_USE_HWLOC})
+  target_include_directories(omp
+                             PUBLIC
----------------
Please fix
https://github.com/llvm/llvm-project/blob/dd018b96d4cce044feb9edd6b5da59b718231ace/openmp/runtime/cmake/config-ix.cmake#L336
check_include_file(hwloc.h LIBOMP_HAVE_HWLOC_H)
guarantees the hwloc.h file can be found but doesn't mean ${LIBOMP_HWLOC_INSTALL_DIR}/include is a valid path.
Please add before check_include_file
find_path(LIBOMP_HWLOC_INCLUDE_DIR NAMES hwloc.h HINTS ${LIBOMP_HWLOC_INSTALL_DIR} PATH_SUFFIXES include)
to confirm a solid include path to the header file,
 and then use LIBOMP_HWLOC_INCLUDE_DIR in target_include_directories here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123888/new/

https://reviews.llvm.org/D123888



More information about the Openmp-commits mailing list