summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestLaunch.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2013-12-01 22:16:06 (GMT)
committerBrad King <brad.king@kitware.com>2013-12-03 14:25:53 (GMT)
commite5e3f3d4ff79d27450618edb01890fc99f212d12 (patch)
tree7e0f3abd82a420dab573e536ab6c507d13bcdb43 /Source/CTest/cmCTestLaunch.cxx
parent845cdbc60ed0f6ab8bfd94bb7175826edbf8565b (diff)
downloadCMake-e5e3f3d4ff79d27450618edb01890fc99f212d12.zip
CMake-e5e3f3d4ff79d27450618edb01890fc99f212d12.tar.gz
CMake-e5e3f3d4ff79d27450618edb01890fc99f212d12.tar.bz2
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.
Diffstat (limited to 'Source/CTest/cmCTestLaunch.cxx')
-rw-r--r--Source/CTest/cmCTestLaunch.cxx19
1 files changed, 18 insertions, 1 deletions
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";
}