[Cmake-commits] CMake branch, next, updated. v3.2.2-2753-g0dfd6b2

Bill Hoffman bill.hoffman at kitware.com
Thu May 14 18:43:50 EDT 2015


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  0dfd6b239219e5ead41749de958743ff1f49353b (commit)
       via  2a21dde89029b34ec46d7f2abdb74310042f7c5a (commit)
      from  6b5cb9289b4d9d5918159a53c870ea9f84cc9e02 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0dfd6b239219e5ead41749de958743ff1f49353b
commit 0dfd6b239219e5ead41749de958743ff1f49353b
Merge: 6b5cb92 2a21dde
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu May 14 18:43:49 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 14 18:43:49 2015 -0400

    Merge topic 'add-iwyu-support' into next
    
    2a21dde8 Change CMAKE_IWYU_EXECUTABLE to CMAKE_IWYU_COMMAND so args can be passed.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a21dde89029b34ec46d7f2abdb74310042f7c5a
commit 2a21dde89029b34ec46d7f2abdb74310042f7c5a
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Thu May 14 18:41:32 2015 -0400
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Thu May 14 18:41:32 2015 -0400

    Change CMAKE_IWYU_EXECUTABLE to CMAKE_IWYU_COMMAND so args can be passed.
    
    iwyu is a bit on the broken side, and sometimes requires extra arguments
    to run correctly.  This change allows for CMAKE_IWYU_COMMAND to be a
    semi-colon separated list that is the command line to run iwyu.

diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index dcdfc48..32b1e3c 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -283,9 +283,9 @@ endif()
 # check to see if CMAKE_IWYU_EXECUTABLE is set.  If yes,
 # then use the cmake -E __run_iwyu command to run iwyu
 # as well as the clang compiler for building cxx files.
-if(CMAKE_IWYU_EXECUTABLE)
+if(CMAKE_IWYU_COMMAND)
   set(CMAKE_CXX_COMPILE_OBJECT
-    "<CMAKE_COMMAND> -E __run_iwyu --iwyu=\"${CMAKE_IWYU_EXECUTABLE}\" -- ${CMAKE_CXX_COMPILE_OBJECT}")
+    "<CMAKE_COMMAND> -E __run_iwyu --iwyu=\"${CMAKE_IWYU_COMMAND}\" -- ${CMAKE_CXX_COMPILE_OBJECT}")
 endif()
 
 
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 98dfcfa..29e07ef 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -133,8 +133,6 @@ static const char* cmCTestWarningMatches[] = {
   "cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
   "^CMake Warning.*:",
   "^\\[WARNING\\]",
-  ".*should remove these lines:",
-  ".*should add these lines:",
   0
 };
 
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 979e935..0683a3f 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -250,8 +250,14 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
         std::cerr << "__run_iwyu missing compile command after --\n";
         return 1;
         }
-      std::vector<std::string> iwyucmd = orig_cmd;
-      iwyucmd[0] = cmd;
+      std::vector<std::string> iwyucmd;
+      cmSystemTools::ExpandListArgument(cmd, iwyucmd);
+      // put the rest of orig_cmd without the compiler orig_cmd[0]
+      // into the iwyucmd
+      for(std::vector<std::string>::size_type i=1; i < orig_cmd.size(); ++i)
+        {
+        iwyucmd.push_back(orig_cmd[i]);
+        }
       int ret = 0;
       std::string stdErr;
       if(!cmSystemTools::RunSingleCommand(iwyucmd, 0, &stdErr, &ret,
@@ -266,7 +272,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
       if(stdErr.find("should remove these lines:") != stdErr.npos
         || stdErr.find("should add these lines:") != stdErr.npos)
         {
-        std::cerr << ":Warning include what you use output: " << stdErr
+        std::cerr << "Warning : include what you use output: " << stdErr
                   << "\n";
         }
       // capture stderr, look for strings

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

Summary of changes:
 Modules/CMakeCXXInformation.cmake    |    4 ++--
 Source/CTest/cmCTestBuildHandler.cxx |    2 --
 Source/cmcmd.cxx                     |   12 +++++++++---
 3 files changed, 11 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list