[Openmp-commits] [PATCH] D93737: [OpenMP] Fixed an issue that wrong LLVM headers might be included when building libomptarget
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Dec 22 17:19:40 PST 2020
tianshilei1992 created this revision.
Herald added subscribers: guansong, yaxunl, mgorny.
tianshilei1992 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
Wrong LLVM headers might be included if we don't set `include_directories`
to a right place. This will cause a compilation error if LLVM is installed in
system directories.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93737
Files:
openmp/libomptarget/src/CMakeLists.txt
Index: openmp/libomptarget/src/CMakeLists.txt
===================================================================
--- openmp/libomptarget/src/CMakeLists.txt
+++ openmp/libomptarget/src/CMakeLists.txt
@@ -21,6 +21,8 @@
${CMAKE_CURRENT_SOURCE_DIR}/omptarget.cpp
)
+include_directories(${LIBOMPTARGET_LLVM_MAIN_INCLUDE_DIR})
+
# Build libomptarget library with libdl dependency. Add LLVMSupport
# dependency if building in-tree with profiling enabled.
if(OPENMP_STANDALONE_BUILD OR (NOT OPENMP_ENABLE_LIBOMPTARGET_PROFILING))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93737.313456.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201223/8fd83a80/attachment.bin>
More information about the Openmp-commits
mailing list