[clang] [mlir] [CMake] Don't reference unexported targets from dependency-only configs (PR #222630)

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 07:11:30 PDT 2026


================
@@ -30,7 +30,11 @@ endif()
 # Generate ClangConfig.cmake for the build tree.
 set(CLANG_CONFIG_CMAKE_DIR "${clang_cmake_builddir}")
 set(CLANG_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}")
-set(CLANG_CONFIG_INCLUDE_EXPORTS "include(\"${clang_cmake_builddir}/ClangTargets.cmake\")")
+if(NOT "clang" IN_LIST LLVM_DEPENDENCY_ONLY_PROJECTS)
----------------
joker-eph wrote:

Ideally we'd prefer "positive" checks (that is "if" instead of "if not": invert the condition and swap the then/else)

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


More information about the cfe-commits mailing list