From fa62b1763cc9cc2cb763b2db4d64d68a3a08c28b Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Mon, 14 Sep 2015 19:11:48 +0000 Subject: [PATCH] Run polly-check-format with unit tests Add polly-check-format as dependency of check-polly if clang-format is available in the same build. Differential Revision: http://reviews.llvm.org/D12850 llvm-svn: 247600 --- polly/test/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/polly/test/CMakeLists.txt b/polly/test/CMakeLists.txt index 9eb32abb580f..2dfa1a864f11 100644 --- a/polly/test/CMakeLists.txt +++ b/polly/test/CMakeLists.txt @@ -78,6 +78,14 @@ else (NOT DEFINED LLVM_MAIN_SRC_DIR) set_target_properties(check-polly PROPERTIES FOLDER "Polly") + # Run polly-check-format as part of polly-check only if we are compiling with + # clang, so clang-format is availbale. + # if (TARGET clang-format) would be preferable, but this target is only added + # after Polly, i.e. there is no such target yet at this point. + if (LLVM_EXTERNAL_CLANG_BUILD) + add_dependencies(check-polly polly-check-format) + endif () + endif (NOT DEFINED LLVM_MAIN_SRC_DIR) configure_file(