[Openmp-commits] [llvm] [openmp] [OpenMP][Offload] Support standalone build (PR #88957)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Apr 17 07:04:29 PDT 2024
================
@@ -214,6 +226,31 @@ set(LIBOMPTARGET_GPU_LIBC_SUPPORT ${LLVM_LIBC_GPU_BUILD} CACHE BOOL
"Libomptarget support for the GPU libc")
pythonize_bool(LIBOMPTARGET_GPU_LIBC_SUPPORT)
+if(OPENMP_STANDALONE_BUILD)
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ find_package(LLVM HINTS ${CMAKE_INSTALL_PREFIX})
+ endif()
+ find_path (
+ LIBOMP_OMP_TOOLS_INCLUDE_DIR
+ NAMES
+ omp-tools.h
+ HINTS
+ ${LLVM_INCLUDE_DIRS}
+ ${LLVM_INCLUDE_DIRS}/../lib/clang/${LLVM_VERSION_MAJOR}/include
----------------
estewart08 wrote:
It will be set from the LLVMConfig.cmake from the result of find_package(LLVM). I did query `clang --print-resource-dir` in a version before this but thought this was a cleaner way.
https://github.com/llvm/llvm-project/pull/88957
More information about the Openmp-commits
mailing list