[Openmp-commits] [llvm] [openmp] [OpenMP][Offload] Support standalone build (PR #88957)

via Openmp-commits openmp-commits at lists.llvm.org
Wed Apr 17 06:57:33 PDT 2024


================
@@ -10,6 +10,13 @@
 #
 ##===----------------------------------------------------------------------===##
 
+cmake_minimum_required(VERSION 3.20.0)
+
+if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+  set(OPENMP_STANDALONE_BUILD TRUE)
+  project(omptarget C CXX ASM)
+endif()
----------------
estewart08 wrote:

Sure, the project could probably change. If the offload/CMakeLists.txt is invoked directly without setting `OPENMP_STANDALONE_BUILD` in the cmake configuration then `OPENMP_STANDALONE_BUILD` will need to be set here so the rest of the checks will work.

https://github.com/llvm/llvm-project/pull/88957


More information about the Openmp-commits mailing list