summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2015-02-17 14:58:25 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-23 15:01:59 (GMT)
commit19d1a5599a08f2e8d74c4483cb9ee6d34e38ecba (patch)
tree4ed086b0f3d7ad7f3f98931b836fabe2493d8c8d /Source/CTest
parent1643b905e02473536d60ef4102d3154a6c8816d1 (diff)
downloadCMake-19d1a5599a08f2e8d74c4483cb9ee6d34e38ecba.zip
CMake-19d1a5599a08f2e8d74c4483cb9ee6d34e38ecba.tar.gz
CMake-19d1a5599a08f2e8d74c4483cb9ee6d34e38ecba.tar.bz2
ctest_start: Add QUIET option
This suppresses all non-error messages that would have otherwise been printed by this function.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestStartCommand.cxx23
-rw-r--r--Source/CTest/cmCTestStartCommand.h10
2 files changed, 27 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index 8ea6cef..e19e4f4 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -20,6 +20,7 @@
cmCTestStartCommand::cmCTestStartCommand()
{
this->CreateNewTag = true;
+ this->Quiet = false;
}
bool cmCTestStartCommand
@@ -57,6 +58,14 @@ bool cmCTestStartCommand
this->CreateNewTag = false;
}
}
+ if (cnt < args.size())
+ {
+ if (args[cnt] == "QUIET")
+ {
+ cnt ++;
+ this->Quiet = true;
+ }
+ }
if ( cnt < args.size() )
{
@@ -95,18 +104,20 @@ bool cmCTestStartCommand
std::string sourceDir = cmSystemTools::CollapseFullPath(src_dir);
std::string binaryDir = cmSystemTools::CollapseFullPath(bld_dir);
- this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir.c_str());
- this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir.c_str());
+ this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir.c_str(),
+ this->Quiet);
+ this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir.c_str(),
+ this->Quiet);
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
<< smodel << std::endl
<< " Source directory: " << src_dir << std::endl
- << " Build directory: " << bld_dir << std::endl);
+ << " Build directory: " << bld_dir << std::endl, this->Quiet);
const char* track = this->CTest->GetSpecificTrack();
if ( track )
{
- cmCTestLog(this->CTest, HANDLER_OUTPUT,
- " Track: " << track << std::endl);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ " Track: " << track << std::endl, this->Quiet);
}
// Log startup actions.
diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h
index 3b8843f..eed1962 100644
--- a/Source/CTest/cmCTestStartCommand.h
+++ b/Source/CTest/cmCTestStartCommand.h
@@ -34,6 +34,7 @@ public:
ni->CTest = this->CTest;
ni->CTestScriptHandler = this->CTestScriptHandler;
ni->CreateNewTag = this->CreateNewTag;
+ ni->Quiet = this->Quiet;
return ni;
}
@@ -53,6 +54,14 @@ public:
}
/**
+ * Should this invocation of ctest_start output non-error messages?
+ */
+ bool ShouldBeQuiet()
+ {
+ return this->Quiet;
+ }
+
+ /**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_start";}
@@ -62,6 +71,7 @@ public:
private:
bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
bool CreateNewTag;
+ bool Quiet;
};