[Cmake-commits] CMake branch, next, updated. v3.2.2-2916-gcc09c58

Brad King brad.king at kitware.com
Mon May 18 14:42:56 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  cc09c58ab42f812b2d72296246efbc52fb879a10 (commit)
       via  0b8581c3b6e73f9d2ed23918ef354913061a433a (commit)
      from  e6a4f19642004c0701c268547afa89489fc8516f (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=cc09c58ab42f812b2d72296246efbc52fb879a10
commit cc09c58ab42f812b2d72296246efbc52fb879a10
Merge: e6a4f19 0b8581c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon May 18 14:42:55 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 18 14:42:55 2015 -0400

    Merge topic 'add-iwyu-support' into next
    
    0b8581c3 Revert topic 'add-iwyu-support'


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b8581c3b6e73f9d2ed23918ef354913061a433a
commit 0b8581c3b6e73f9d2ed23918ef354913061a433a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon May 18 14:42:32 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon May 18 14:42:32 2015 -0400

    Revert topic 'add-iwyu-support'
    
    It will be revised and replaced with a new approach.

diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 32b1e3c..72b2857 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -280,14 +280,6 @@ if(NOT CMAKE_CXX_COMPILE_OBJECT)
   set(CMAKE_CXX_COMPILE_OBJECT
     "<CMAKE_CXX_COMPILER>  <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
 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_COMMAND)
-  set(CMAKE_CXX_COMPILE_OBJECT
-    "<CMAKE_COMMAND> -E __run_iwyu --iwyu=\"${CMAKE_IWYU_COMMAND}\" -- ${CMAKE_CXX_COMPILE_OBJECT}")
-endif()
-
 
 if(NOT CMAKE_CXX_LINK_EXECUTABLE)
   set(CMAKE_CXX_LINK_EXECUTABLE
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index a205f2b..12bb8ee 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -210,84 +210,6 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
         }
       return 0;
       }
-    // run include what you use command and then run the compile
-    // command. This is an internal undocumented option and should
-    // only be used by CMake itself when running iwyu.
-    else if (args[1] == "__run_iwyu")
-      {
-      if(args.size() <  3)
-        {
-        std::cerr << "__run_iwyu Usage: -E __run_iwyu [--iwyu=/path/iwyu]"
-          " -- compile command\n";
-        return 1;
-        }
-      bool doing_options = true;
-      std::vector<std::string> orig_cmd;
-      std::string cmd;
-      for (std::string::size_type cc = 2; cc < args.size(); cc ++)
-        {
-        std::string const& arg = args[cc];
-        if(arg == "--")
-          {
-          doing_options = false;
-          }
-        else if (doing_options && cmHasLiteralPrefix(arg, "--iwyu="))
-          {
-          cmd = arg.substr(7);
-          }
-        else if(!doing_options)
-          {
-          orig_cmd.push_back(arg);
-          }
-        }
-      if(cmd.empty())
-        {
-        std::cerr << "__run_iwyu missing iwyu path --iwyu=/path/to/iwyu\n";
-        return 1;
-        }
-      if(orig_cmd.empty())
-        {
-        std::cerr << "__run_iwyu missing compile command after --\n";
-        return 1;
-        }
-      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,
-                                          0, cmSystemTools::OUTPUT_NONE))
-        {
-        // if the command fails to run then output the command and
-        // the stderr from RunSingleCommand and return 1
-        std::cerr << "Error running: " << cmd << "\n";
-        std::cerr << stdErr << "\n";
-        return 1;
-        }
-      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
-                  << "\n";
-        }
-      // capture stderr, look for strings
-      // output Warning iwyu output:\n make sure matches regex
-      // the return value of iwyu is ignored as it is always fail
-      if(!cmSystemTools::RunSingleCommand(orig_cmd, 0, &stdErr, &ret, 0,
-                                          cmSystemTools::OUTPUT_PASSTHROUGH))
-        {
-        std::cerr << "Error running: " << orig_cmd[0] << "\n";
-        std::cerr << stdErr << "\n";
-        return 1;
-        }
-      // return the value of the real compile command
-      return ret;
-      }
 
     // Echo string
     else if (args[1] == "echo" )

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

Summary of changes:
 Modules/CMakeCXXInformation.cmake |    8 ----
 Source/cmcmd.cxx                  |   78 -------------------------------------
 2 files changed, 86 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list