[Openmp-commits] [openmp] [OpenMP] Fix LLVM_ENABLE_PROJECTS=openmp build (PR #151117)

Michael Kruse via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 31 10:59:45 PDT 2025


================
@@ -48,6 +50,15 @@ if (OPENMP_STANDALONE_BUILD)
   set(CMAKE_CXX_STANDARD_REQUIRED NO)
   set(CMAKE_CXX_EXTENSIONS NO)
 else()
+  # Usually <llvm-project>/runtimes/CMakeLists.txt sets LLVM_TREE_AVAILABLE and
+  # we assume it is not available otherwise. The exception is that we are in an
+  # LLVM_ENABLE_PROJECTS=openmp build, the LLVM tree is actually available.
+  # Note that this build mode has been deprecated.
+  # See https://github.com/llvm/llvm-project/issues/124014
+  if (NOT LLVM_RUNTIMES_BUILD AND "openmp" IN_LIST LLVM_ENABLE_PROJECTS)
+    set(LLVM_TREE_AVAILABLE True)
+  endif ()
----------------
Meinersbur wrote:

Deprecation is just a notice that it is going to be removed to encourage users to move away from it. Until it really is removed, is should still work.

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


More information about the Openmp-commits mailing list