https://github.com/jabraham17 created https://github.com/llvm/llvm-project/pull/187317
Adds a new build option for clang, CLANG_INCLUDE_EXAMPLES, which controls if the examples directory is included in the build. It defaults to the value for LLVM_INCLUDE_EXAMPLES (same as CLANG_INCLUDE_DOCS and CLANG_INCLUDE_TESTS) >From cd7cb0b9fca9c5a03f86f1ee8490d526d1981a62 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
