[Cmake-commits] CMake branch, master, updated. v3.10.0-383-g4d52b46

Kitware Robot kwrobot at kitware.com
Mon Nov 20 13:45:06 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  4d52b46c7046a23948221d4142d768b9ff834e33 (commit)
       via  08353542e578cf756573c41ec4696dbf1c6513f0 (commit)
      from  7ec847395d1302e2a09e090d486426f984342d04 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d52b46c7046a23948221d4142d768b9ff834e33
commit 4d52b46c7046a23948221d4142d768b9ff834e33
Merge: 7ec8473 0835354
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 20 18:37:40 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Nov 20 13:37:50 2017 -0500

    Merge topic 'tidy-sha1-comment'
    
    08353542 clang-tidy: Clarify comment explaining purpose of CLANG_TIDY_SHA1
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1497


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08353542e578cf756573c41ec4696dbf1c6513f0
commit 08353542e578cf756573c41ec4696dbf1c6513f0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 17 10:47:25 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 17 10:51:02 2017 -0500

    clang-tidy: Clarify comment explaining purpose of CLANG_TIDY_SHA1
    
    Suggested-by: Bill Hoffman <bill.hoffman at kitware.com>

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f14f62f..72ad7f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -251,7 +251,12 @@ if(CMake_RUN_CLANG_TIDY)
   endif()
   set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
 
-  # provide definitions for targets that require a rebuild once .clang-tidy changes
+  # Create a preprocessor definition that depends on .clang-tidy content so
+  # the compile command will change when .clang-tidy changes.  This ensures
+  # that a subsequent build re-runs clang-tidy on all sources even if they
+  # do not otherwise need to be recompiled.  Nothing actually uses this
+  # definition.  We add it to targets on which we run clang-tidy just to
+  # get the build dependency on the .clang-tidy file.
   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)

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list