From ccb9aa35863d2b0b7c670eed982cdb7ec61321b9 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 14 Jul 2014 22:17:22 +0000 Subject: [PATCH] Fix build with various feature flag combinations llvm-svn: 212996 --- clang/lib/CMakeLists.txt | 4 +--- clang/test/CMakeLists.txt | 13 ++++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/clang/lib/CMakeLists.txt b/clang/lib/CMakeLists.txt index 7bb65e9..dfd819a 100644 --- a/clang/lib/CMakeLists.txt +++ b/clang/lib/CMakeLists.txt @@ -3,9 +3,7 @@ add_subdirectory(Basic) add_subdirectory(Lex) add_subdirectory(Parse) add_subdirectory(AST) -if(CLANG_ENABLE_REWRITER) - add_subdirectory(ASTMatchers) -endif() +add_subdirectory(ASTMatchers) add_subdirectory(Sema) add_subdirectory(CodeGen) add_subdirectory(Analysis) diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt index 2052873..b7d689c 100644 --- a/clang/test/CMakeLists.txt +++ b/clang/test/CMakeLists.txt @@ -27,10 +27,16 @@ endif () list(APPEND CLANG_TEST_DEPS clang clang-headers c-index-test diagtool - clang-check clang-format clang-tblgen ) +if (CLANG_ENABLE_REWRITER) + list(APPEND CLANG_TEST_DEPS + clang-check + clang-format + ) +endif () + if (CLANG_ENABLE_ARCMT) list(APPEND CLANG_TEST_DEPS arcmt-test @@ -42,6 +48,11 @@ if (ENABLE_CLANG_EXAMPLES) list(APPEND CLANG_TEST_DEPS clang-interpreter PrintFunctionNames + ) +endif () + +if (ENABLE_CLANG_STATIC_ANALYZER AND ENABLE_CLANG_EXAMPLES) + list(APPEND CLANG_TEST_DEPS SampleAnalyzerPlugin ) endif () -- 2.7.4