Don't add examples to the check-clang dependencies unless requested
The tests were correctly getting skipped but the targets still mistakenly got
built.
llvm-svn: 209983
diff --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index 66a8cab..fe80df4 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -29,10 +29,16 @@
c-index-test diagtool arcmt-test c-arcmt-test
clang-check clang-format
clang-tblgen
- clang-interpreter
- PrintFunctionNames
- SampleAnalyzerPlugin
)
+
+if (ENABLE_CLANG_EXAMPLES)
+ list(APPEND CLANG_TEST_DEPS
+ clang-interpreter
+ PrintFunctionNames
+ SampleAnalyzerPlugin
+ )
+endif ()
+
set(CLANG_TEST_PARAMS
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)