[clang-tools-extra] r212994 - Fix build when various clang feature flags are enabled/disabled

Alp Toker alp at nuanti.com
Mon Jul 14 15:15:30 PDT 2014


Author: alp
Date: Mon Jul 14 17:15:29 2014
New Revision: 212994

URL: http://llvm.org/viewvc/llvm-project?rev=212994&view=rev
Log:
Fix build when various clang feature flags are enabled/disabled

Modified:
    clang-tools-extra/trunk/CMakeLists.txt

Modified: clang-tools-extra/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/CMakeLists.txt?rev=212994&r1=212993&r2=212994&view=diff
==============================================================================
--- clang-tools-extra/trunk/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/CMakeLists.txt Mon Jul 14 17:15:29 2014
@@ -1,13 +1,21 @@
+if(CLANG_ENABLE_REWRITER)
 add_subdirectory(clang-apply-replacements)
 add_subdirectory(clang-modernize)
-add_subdirectory(clang-query)
-add_subdirectory(clang-tidy)
 add_subdirectory(modularize)
 add_subdirectory(module-map-checker)
-add_subdirectory(pp-trace)
 add_subdirectory(remove-cstr-calls)
+endif()
+if(CLANG_ENABLE_STATIC_ANALYZER)
+add_subdirectory(clang-tidy)
+endif()
+
+add_subdirectory(clang-query)
+add_subdirectory(pp-trace)
 add_subdirectory(tool-template)
 
 # Add the common testsuite after all the tools.
+# TODO: Support tests with more granularity when features are off?
+if(CLANG_ENABLE_REWRITER AND CLANG_ENABLE_STATIC_ANALYZER)
 add_subdirectory(test)
 add_subdirectory(unittests)
+endif()





More information about the cfe-commits mailing list