diff options
-rw-r--r-- | CMakeLists.txt | 16 | ||||
-rw-r--r-- | test/ARCMT/lit.local.cfg | 2 | ||||
-rw-r--r-- | test/Analysis/lit.local.cfg | 2 | ||||
-rw-r--r-- | test/CMakeLists.txt | 10 | ||||
-rw-r--r-- | test/Rewriter/lit.local.cfg | 2 | ||||
-rw-r--r-- | test/Tooling/lit.local.cfg | 2 | ||||
-rw-r--r-- | test/lit.cfg | 8 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 10 |
8 files changed, 21 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 417a907731..4764d5cfc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,18 +364,7 @@ option(CLANG_BUILD_TOOLS "Build the Clang tools. If OFF, just generate build targets." ON) option(CLANG_ENABLE_ARCMT "Build ARCMT." ON) -if (CLANG_ENABLE_ARCMT) - set(ENABLE_CLANG_ARCMT "1") -else() - set(ENABLE_CLANG_ARCMT "0") -endif() - option(CLANG_ENABLE_STATIC_ANALYZER "Build static analyzer." ON) -if (CLANG_ENABLE_STATIC_ANALYZER) - set(ENABLE_CLANG_STATIC_ANALYZER "1") -else() - set(ENABLE_CLANG_STATIC_ANALYZER "0") -endif() if (NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT) message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT") @@ -415,11 +404,6 @@ 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) if(APPLE) diff --git a/test/ARCMT/lit.local.cfg b/test/ARCMT/lit.local.cfg index 4b28d6dff8..e9b04164d6 100644 --- a/test/ARCMT/lit.local.cfg +++ b/test/ARCMT/lit.local.cfg @@ -1,2 +1,2 @@ -if config.root.clang_arcmt == 0: +if not config.root.clang_arcmt: config.unsupported = True diff --git a/test/Analysis/lit.local.cfg b/test/Analysis/lit.local.cfg index da2a68b378..4cd8ba72fa 100644 --- a/test/Analysis/lit.local.cfg +++ b/test/Analysis/lit.local.cfg @@ -1,2 +1,2 @@ -if config.root.clang_staticanalyzer == 0: +if not config.root.clang_staticanalyzer: config.unsupported = True diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e3371994ae..08ab205d97 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,6 +18,12 @@ if(CLANG_BUILT_STANDALONE) endif() endif() +llvm_canonicalize_cmake_booleans( + CLANG_BUILD_EXAMPLES + CLANG_ENABLE_ARCMT + CLANG_ENABLE_STATIC_ANALYZER + ENABLE_BACKTRACES) + configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg @@ -55,7 +61,7 @@ if (CLANG_ENABLE_ARCMT) ) endif () -if (ENABLE_CLANG_EXAMPLES) +if (CLANG_BUILD_EXAMPLES) list(APPEND CLANG_TEST_DEPS AnnotateFunctions clang-interpreter @@ -63,7 +69,7 @@ if (ENABLE_CLANG_EXAMPLES) ) endif () -if (ENABLE_CLANG_STATIC_ANALYZER AND ENABLE_CLANG_EXAMPLES) +if (CLANG_ENABLE_STATIC_ANALYZER AND CLANG_BUILD_EXAMPLES) list(APPEND CLANG_TEST_DEPS SampleAnalyzerPlugin ) diff --git a/test/Rewriter/lit.local.cfg b/test/Rewriter/lit.local.cfg index 69b733b2e4..f5e1d0349f 100644 --- a/test/Rewriter/lit.local.cfg +++ b/test/Rewriter/lit.local.cfg @@ -1,3 +1,3 @@ # The Objective-C rewriters are currently grouped with ARCMT. -if config.root.clang_arcmt == 0: +if not config.root.clang_arcmt: config.unsupported = True diff --git a/test/Tooling/lit.local.cfg b/test/Tooling/lit.local.cfg index da2a68b378..4cd8ba72fa 100644 --- a/test/Tooling/lit.local.cfg +++ b/test/Tooling/lit.local.cfg @@ -1,2 +1,2 @@ -if config.root.clang_staticanalyzer == 0: +if not config.root.clang_staticanalyzer: config.unsupported = True diff --git a/test/lit.cfg b/test/lit.cfg index 7d8bebf57f..65b07749c2 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -202,7 +202,7 @@ if not lit_config.quiet: # Plugins (loadable modules) # TODO: This should be supplied by Makefile or autoconf. if sys.platform in ['win32', 'cygwin']: - has_plugins = (config.enable_shared == 1) + has_plugins = config.enable_shared else: has_plugins = True @@ -353,7 +353,7 @@ if config.clang_default_cxx_stdlib != '': config.available_features.add('default-cxx-stdlib-set') # Enabled/disabled features -if config.clang_staticanalyzer != 0: +if config.clang_staticanalyzer: config.available_features.add("staticanalyzer") # As of 2011.08, crash-recovery tests still do not pass on FreeBSD. @@ -474,10 +474,10 @@ if 'Undefined' in config.llvm_use_sanitizer: else: config.available_features.add("not_ubsan") -if config.enable_backtrace == "1": +if config.enable_backtrace: config.available_features.add("backtrace") -if config.have_zlib == "1": +if config.have_zlib: config.available_features.add("zlib") else: config.available_features.add("nozlib") diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 5e1471f131..ec447b6615 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -14,13 +14,13 @@ config.clang_tools_dir = "@CLANG_TOOLS_DIR@" config.host_triple = "@LLVM_HOST_TRIPLE@" config.target_triple = "@TARGET_TRIPLE@" config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@" -config.have_zlib = "@HAVE_LIBZ@" -config.clang_arcmt = @ENABLE_CLANG_ARCMT@ +config.have_zlib = @HAVE_LIBZ@ +config.clang_arcmt = @CLANG_ENABLE_ARCMT@ config.clang_default_cxx_stdlib = "@CLANG_DEFAULT_CXX_STDLIB@" -config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@ -config.clang_examples = @ENABLE_CLANG_EXAMPLES@ +config.clang_staticanalyzer = @CLANG_ENABLE_STATIC_ANALYZER@ +config.clang_examples = @CLANG_BUILD_EXAMPLES@ config.enable_shared = @ENABLE_SHARED@ -config.enable_backtrace = "@ENABLE_BACKTRACES@" +config.enable_backtrace = @ENABLE_BACKTRACES@ config.host_arch = "@HOST_ARCH@" # Support substitution of the tools and libs dirs with user parameters. This is |