[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5990-gbb219d4

Brad King brad.king at kitware.com
Tue Dec 3 09:28:06 EST 2013


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  bb219d44e9dbeab00319e5301e75ee08c6886ab6 (commit)
       via  e5e3f3d4ff79d27450618edb01890fc99f212d12 (commit)
      from  56e44372b3aab0819ceb9b94271b001dae44e49f (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=bb219d44e9dbeab00319e5301e75ee08c6886ab6
commit bb219d44e9dbeab00319e5301e75ee08c6886ab6
Merge: 56e4437 e5e3f3d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 3 09:28:02 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 3 09:28:02 2013 -0500

    Merge topic 'filter-showincludes-in-launcher' into next
    
    e5e3f3d CTest: filter /showIncludes output from ninja compile launcher


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5e3f3d4ff79d27450618edb01890fc99f212d12
commit e5e3f3d4ff79d27450618edb01890fc99f212d12
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sun Dec 1 23:16:06 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 3 09:25:53 2013 -0500

    CTest: filter /showIncludes output from ninja compile launcher
    
    Teach "ctest --launch" a new "--filter-prefix" option.  Set it using
    the CMAKE_CL_SHOWINCLUDES_PREFIX value with the Ninja generator.

diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake
index 2fab247..c79119f 100644
--- a/Modules/CTestUseLaunchers.cmake
+++ b/Modules/CTestUseLaunchers.cmake
@@ -46,9 +46,31 @@ if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja")
 endif()
 
 if(CTEST_USE_LAUNCHERS)
-  set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --")
-  set(CTEST_LAUNCH_LINK    "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --")
-  set(CTEST_LAUNCH_CUSTOM  "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --")
+  set(__launch_common_options
+    "--target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR>")
+
+  set(__launch_compile_options
+    "${__launch_common_options} --output <OBJECT> --source <SOURCE> --language <LANGUAGE>")
+
+  set(__launch_link_options
+    "${__launch_common_options} --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE>")
+
+  set(__launch_custom_options
+    "${__launch_common_options} --output <OUTPUT>")
+
+  if("${CMAKE_GENERATOR}" MATCHES "Ninja")
+    set(__launch_compile_options "${__launch_compile_options} --filter-prefix <CMAKE_CL_SHOWINCLUDES_PREFIX>")
+  endif()
+
+  set(CTEST_LAUNCH_COMPILE
+    "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_compile_options} --")
+
+  set(CTEST_LAUNCH_LINK
+    "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_link_options} --")
+
+  set(CTEST_LAUNCH_CUSTOM
+    "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_custom_options} --")
+
   set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}")
   set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}")
   set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}")
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 9831d02..8e5fd78 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -64,7 +64,8 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
                DoingTargetName,
                DoingTargetType,
                DoingBuildDir,
-               DoingCount };
+               DoingCount,
+               DoingFilterPrefix };
   Doing doing = DoingNone;
   int arg0 = 0;
   for(int i=1; !arg0 && i < argc; ++i)
@@ -98,6 +99,10 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
       {
       doing = DoingBuildDir;
       }
+    else if(strcmp(arg, "--filter-prefix") == 0)
+      {
+      doing = DoingFilterPrefix;
+      }
     else if(doing == DoingOutput)
       {
       this->OptionOutput = arg;
@@ -132,6 +137,11 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
       this->OptionBuildDir = arg;
       doing = DoingNone;
       }
+    else if(doing == DoingFilterPrefix)
+      {
+      this->OptionFilterPrefix = arg;
+      doing = DoingNone;
+      }
     }
 
   // Extract the real command line.
@@ -573,8 +583,15 @@ void cmCTestLaunch::DumpFileToXML(std::ostream& fxml,
 
   std::string line;
   const char* sep = "";
+
   while(cmSystemTools::GetLineFromStream(fin, line))
     {
+    if(OptionFilterPrefix.size() && cmSystemTools::StringStartsWith(
+      line.c_str(), OptionFilterPrefix.c_str()))
+      {
+      continue;
+      }
+
     fxml << sep << cmXMLSafe(line).Quotes(false);
     sep = "\n";
     }
diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h
index 7457e83..a86a9df 100644
--- a/Source/CTest/cmCTestLaunch.h
+++ b/Source/CTest/cmCTestLaunch.h
@@ -45,6 +45,7 @@ private:
   std::string OptionTargetName;
   std::string OptionTargetType;
   std::string OptionBuildDir;
+  std::string OptionFilterPrefix;
   bool ParseArguments(int argc, const char* const* argv);
 
   // The real command line appearing after launcher arguments.
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d26d6e9..c3c5299 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -807,6 +807,7 @@ static const char* ruleReplaceVars[] =
   "CMAKE_CURRENT_BINARY_DIR",
   "CMAKE_RANLIB",
   "CMAKE_LINKER",
+  "CMAKE_CL_SHOWINCLUDES_PREFIX",
   0
 };
 
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 21700e9..9a89f0f 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -266,6 +266,7 @@ public:
     const char* Defines;
     const char* RuleLauncher;
     const char* DependencyFile;
+    const char* FilterPrefix;
   };
 
   /** Set whether to treat conversions to SHELL as a link script shell.  */

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list