summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-26 14:38:53 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-26 14:38:53 (GMT)
commit75428cdfb9685c7e58270cae1f487b51fa0cc351 (patch)
tree492c3a9baa3682466caed86ec7ff90950493304e /Source
parent6223621e9a4bfc7bbf91037183c725c4300db397 (diff)
parent47702b8d49d686d4db2c66b6abd872517480d718 (diff)
downloadCMake-75428cdfb9685c7e58270cae1f487b51fa0cc351.zip
CMake-75428cdfb9685c7e58270cae1f487b51fa0cc351.tar.gz
CMake-75428cdfb9685c7e58270cae1f487b51fa0cc351.tar.bz2
Merge topic 'fix-showinclude-warnings'
47702b8d CTest: exclude /showIncludes notes when scraping logs
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestLaunch.cxx19
-rw-r--r--Source/CTest/cmCTestLaunch.h1
2 files changed, 18 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx
index 7d9c034..cd3bd57 100644
--- a/Source/CTest/cmCTestLaunch.cxx
+++ b/Source/CTest/cmCTestLaunch.cxx
@@ -587,8 +587,7 @@ void cmCTestLaunch::DumpFileToXML(std::ostream& fxml,
while(cmSystemTools::GetLineFromStream(fin, line))
{
- if(OptionFilterPrefix.size() && cmSystemTools::StringStartsWith(
- line.c_str(), OptionFilterPrefix.c_str()))
+ if(MatchesFilterPrefix(line))
{
continue;
}
@@ -676,6 +675,11 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
std::string line;
while(cmSystemTools::GetLineFromStream(fin, line))
{
+ if(MatchesFilterPrefix(line))
+ {
+ continue;
+ }
+
if(this->Match(line.c_str(), this->RegexWarning) &&
!this->Match(line.c_str(), this->RegexWarningSuppress))
{
@@ -701,6 +705,17 @@ bool cmCTestLaunch::Match(std::string const& line,
}
//----------------------------------------------------------------------------
+bool cmCTestLaunch::MatchesFilterPrefix(std::string const& line) const
+{
+ if(this->OptionFilterPrefix.size() && cmSystemTools::StringStartsWith(
+ line.c_str(), this->OptionFilterPrefix.c_str()))
+ {
+ return true;
+ }
+ return false;
+}
+
+//----------------------------------------------------------------------------
int cmCTestLaunch::Main(int argc, const char* const argv[])
{
if(argc == 2)
diff --git a/Source/CTest/cmCTestLaunch.h b/Source/CTest/cmCTestLaunch.h
index a86a9df..f680d19 100644
--- a/Source/CTest/cmCTestLaunch.h
+++ b/Source/CTest/cmCTestLaunch.h
@@ -88,6 +88,7 @@ private:
bool ScrapeLog(std::string const& fname);
bool Match(std::string const& line,
std::vector<cmsys::RegularExpression>& regexps);
+ bool MatchesFilterPrefix(std::string const& line) const;
// Methods to generate the xml fragment.
void WriteXML();