diff options
author | Brad King <brad.king@kitware.com> | 2017-09-29 12:47:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-09-29 12:48:16 (GMT) |
commit | e24e0ff6fac02bc8a12514d22ab4d8b80d789f56 (patch) | |
tree | e48f4134d4d5f1f685626713d1fa41bf8a8496fb /CMakeLists.txt | |
parent | f920ffd8f382c891bd863977eb453533b39c4bcc (diff) | |
parent | 77f674be35717a6eb296246733885b5a7ddf95ec (diff) | |
download | CMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.zip CMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.tar.gz CMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.tar.bz2 |
Merge topic 'clang-tidy'
77f674be Fix some occurrences of readability-braces-around-statements
f0bab294 Convert some leftover loops to C++11 range-based loop
b5d7f5b0 Fix occurrences of readability-non-const-parameter
9a2da339 Fix some occurrences of readability-avoid-const-params-in-decls
870dd06d Fix left-over occurrences of else-after-return
2033abff Fix minor clang-tidy findings
79b8c380 Improve several occurrences of vector::push_back in loops
a45928cd Fix some occurrences of missing override keywords
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1292
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c578ec3..f14f62f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,6 +250,12 @@ if(CMake_RUN_CLANG_TIDY) message(FATAL_ERROR "CMake_RUN_CLANG_TIDY is ON but clang-tidy is not found!") endif() set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}") + + # provide definitions for targets that require a rebuild once .clang-tidy changes + file(SHA1 ${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy clang_tidy_sha1) + set(CLANG_TIDY_DEFINITIONS "CLANG_TIDY_SHA1=${clang_tidy_sha1}") + unset(clang_tidy_sha1) + endif() configure_file(.clang-tidy .clang-tidy COPYONLY) |