r198750 - Build fix following r198747

Alp Toker alp at nuanti.com
Wed Jan 8 03:55:49 PST 2014


Author: alp
Date: Wed Jan  8 05:55:49 2014
New Revision: 198750

URL: http://llvm.org/viewvc/llvm-project?rev=198750&view=rev
Log:
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.

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/test/lit.site.cfg.in

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=198750&r1=198749&r2=198750&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed Jan  8 05:55:49 2014
@@ -414,6 +414,11 @@ add_subdirectory(tools)
 add_subdirectory(runtime)
 
 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)
 
 option(CLANG_INCLUDE_TESTS

Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=198750&r1=198749&r2=198750&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Wed Jan  8 05:55:49 2014
@@ -16,7 +16,7 @@ config.llvm_use_sanitizer = "@LLVM_USE_S
 config.clang_arcmt = @ENABLE_CLANG_ARCMT@
 config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
 config.clang_rewriter = @ENABLE_CLANG_REWRITER@
-config.clang_examples = @CLANG_BUILD_EXAMPLES@
+config.clang_examples = @ENABLE_CLANG_EXAMPLES@
 config.host_arch = "@HOST_ARCH@"
 
 # Support substitution of the tools and libs dirs with user parameters. This is





More information about the cfe-commits mailing list