Add build option CLANG_INCLUDE_EXAMPLES (#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) Signed-off-by: Jade Abraham <jademabraham17@gmail.com>
This commit is contained in:
parent
43ef833f39
commit
a1feacb3e4
1 changed files with 6 additions and 1 deletions
|
|
@ -560,7 +560,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue