llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Jade Abraham (jabraham17)

<details>
<summary>Changes</summary>

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)

---
Full diff: https://github.com/llvm/llvm-project/pull/187317.diff


1 Files Affected:

- (modified) clang/CMakeLists.txt (+6-1) 


``````````diff
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

``````````

</details>


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

Reply via email to