[Openmp-commits] [PATCH] D89426: [libomptarget] Require LLVM source tree to build libomptarget

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 16 08:00:33 PDT 2020


JonChesterfield updated this revision to Diff 298636.
JonChesterfield added a comment.

- review comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89426

Files:
  openmp/CMakeLists.txt
  openmp/libomptarget/CMakeLists.txt


Index: openmp/libomptarget/CMakeLists.txt
===================================================================
--- openmp/libomptarget/CMakeLists.txt
+++ openmp/libomptarget/CMakeLists.txt
@@ -29,6 +29,11 @@
 # Get dependencies for the different components of the project.
 include(LibomptargetGetDependencies)
 
+# LLVM source tree is required at build time for libomptarget
+if (NOT LLVM_MAIN_INCLUDE_DIR)
+  message(FATAL_ERROR "Missing definition for LLVM_MAIN_INCLUDE_DIR")
+endif()
+
 # This is a list of all the targets that are supported/tested right now.
 set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu")
 set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu")
Index: openmp/CMakeLists.txt
===================================================================
--- openmp/CMakeLists.txt
+++ openmp/CMakeLists.txt
@@ -66,6 +66,11 @@
   set(ENABLE_LIBOMPTARGET OFF)
 endif()
 
+if (NOT LLVM_MAIN_INCLUDE_DIR)
+  message(STATUS "Missing definition for LLVM_MAIN_INCLUDE_DIR, disabling libomptarget")
+  set(ENABLE_LIBOMPTARGET OFF)
+endif()
+
 option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
        ${ENABLE_LIBOMPTARGET})
 if (OPENMP_ENABLE_LIBOMPTARGET)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89426.298636.patch
Type: text/x-patch
Size: 1262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201016/292686f1/attachment.bin>


More information about the Openmp-commits mailing list