Fix dependencies now that the ARC migrator depends on the static analyzer.
Thanks for pointing this out, Stephen. I think this is right now -- I
attempted to try all four valid combinations with both the autoconf and
CMake builds.
See also LLVM changes to the configure script.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22b12f3..eb0b0a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -274,9 +274,9 @@
add_definitions( -D_GNU_SOURCE )
-option(CLANG_ENABLE_ARCMT "Enable ARCMT by default." ON)
-option(CLANG_ENABLE_REWRITER "Enable rewriter by default." ON)
-option(CLANG_ENABLE_STATIC_ANALYZER "Enable static analyzer by default." ON)
+option(CLANG_ENABLE_ARCMT "Build ARCMT." ON)
+option(CLANG_ENABLE_REWRITER "Build rewriter." ON)
+option(CLANG_ENABLE_STATIC_ANALYZER "Build static analyzer." ON)
if (NOT CLANG_ENABLE_REWRITER AND CLANG_ENABLE_ARCMT)
message(FATAL_ERROR "Cannot disable rewriter while enabling ARCMT")
@@ -286,6 +286,10 @@
message(FATAL_ERROR "Cannot disable rewriter while enabling static analyzer")
endif()
+if (NOT CLANG_ENABLE_STATIC_ANALYZER AND CLANG_ENABLE_ARCMT)
+ message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT")
+endif()
+
if(CLANG_ENABLE_ARCMT)
add_definitions(-DCLANG_ENABLE_ARCMT)
endif()