[Cmake-commits] CMake branch, next, updated. v3.5.2-1128-g065f716

Brad King brad.king at kitware.com
Thu Apr 28 09:44:14 EDT 2016


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, next has been updated
       via  065f71643d2e8e2d4a8017ae6f879e3a103d7158 (commit)
       via  304ab71db0fa68ff5cfe5e63adac6ade76ef6f31 (commit)
      from  fca925bb162c25f71b5c85ade9344af31b183614 (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=065f71643d2e8e2d4a8017ae6f879e3a103d7158
commit 065f71643d2e8e2d4a8017ae6f879e3a103d7158
Merge: fca925b 304ab71
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Apr 28 09:44:13 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 28 09:44:13 2016 -0400

    Merge topic 'clang-tidy-argv0' into next
    
    304ab71d Clang-Tidy: Give entire compiler command line to clant-tidy tool


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=304ab71db0fa68ff5cfe5e63adac6ade76ef6f31
commit 304ab71db0fa68ff5cfe5e63adac6ade76ef6f31
Author:     Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Thu Apr 28 00:48:15 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Apr 28 09:42:31 2016 -0400

    Clang-Tidy: Give entire compiler command line to clant-tidy tool
    
    The tool expects the entire compiler command, including `cc`.  It
    will automatically skip that and extract the options it needs.

diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 0b9518c..19f3886 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -382,12 +382,14 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
       if (!tidy.empty())
         {
         // Construct the clang-tidy command line by taking what was given
-        // and adding all the arguments we give to the compiler.
+        // and adding our compiler command line.  The clang-tidy tool will
+        // automatically skip over the compiler itself and extract the
+        // options.
         std::vector<std::string> tidy_cmd;
         cmSystemTools::ExpandListArgument(tidy, tidy_cmd, true);
         tidy_cmd.push_back(sourceFile);
         tidy_cmd.push_back("--");
-        tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin()+1, orig_cmd.end());
+        tidy_cmd.insert(tidy_cmd.end(), orig_cmd.begin(), orig_cmd.end());
 
         // Run the tidy command line.  Capture its stdout and hide its stderr.
         std::string stdOut;

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

Summary of changes:
 Source/cmcmd.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list