forked from OSchip/llvm-project
Build fix following r198747
Convert CMake CLANG_BUILD_EXAMPLES to a boolean value for consumption by Python, otherwise the raw config string gets passed through which may not be 0/1. The if/else matches the technique used to solve the problem in LLVM's own CMakeLists.txt. llvm-svn: 198750
This commit is contained in:
parent
4daaa8e8f2
commit
70ff5d7378
|
@ -414,6 +414,11 @@ add_subdirectory(tools)
|
||||||
add_subdirectory(runtime)
|
add_subdirectory(runtime)
|
||||||
|
|
||||||
option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
|
option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
|
||||||
|
if (CLANG_BUILD_EXAMPLES)
|
||||||
|
set(ENABLE_CLANG_EXAMPLES "1")
|
||||||
|
else()
|
||||||
|
set(ENABLE_CLANG_EXAMPLES "0")
|
||||||
|
endif()
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
|
|
||||||
option(CLANG_INCLUDE_TESTS
|
option(CLANG_INCLUDE_TESTS
|
||||||
|
|
|
@ -16,7 +16,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
|
||||||
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
|
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
|
||||||
config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
|
config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
|
||||||
config.clang_rewriter = @ENABLE_CLANG_REWRITER@
|
config.clang_rewriter = @ENABLE_CLANG_REWRITER@
|
||||||
config.clang_examples = @CLANG_BUILD_EXAMPLES@
|
config.clang_examples = @ENABLE_CLANG_EXAMPLES@
|
||||||
config.host_arch = "@HOST_ARCH@"
|
config.host_arch = "@HOST_ARCH@"
|
||||||
|
|
||||||
# Support substitution of the tools and libs dirs with user parameters. This is
|
# Support substitution of the tools and libs dirs with user parameters. This is
|
||||||
|
|
Loading…
Reference in New Issue