https://github.com/jabraham17 updated 
https://github.com/llvm/llvm-project/pull/187317

>From 7c88f3a6629b4602c6815daa1619346f66184d06 Mon Sep 17 00:00:00 2001
From: Jade Abraham <[email protected]>
Date: Wed, 18 Mar 2026 11:14:00 -0500
Subject: [PATCH] add build option CLANG_INCLUDE_EXAMPLES to match
 LLVM_INCLUDE_EXAMPLES

Signed-off-by: Jade Abraham <[email protected]>
---
 clang/CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index f0d10603374b9..c0e6ef5b433bf 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -508,7 +508,12 @@ add_subdirectory(tools)
 add_subdirectory(runtime)
 
 option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
-add_subdirectory(examples)
+option(CLANG_INCLUDE_EXAMPLES
+       "Generate build targets for the Clang examples."
+       ${LLVM_INCLUDE_EXAMPLES})
+if (CLANG_INCLUDE_EXAMPLES)
+  add_subdirectory(examples)
+endif()
 
 if(APPLE)
   # this line is needed as a cleanup to ensure that any CMakeCaches with the 
old

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to