Commit 0e69d380 authored by Ken Martin's avatar Ken Martin
Browse files

ENH: add return and break support to cmake, also change basic command...

ENH: add return and break support to cmake, also change basic command invocation signature to be able to return extra informaiton via the cmExecutionStatus class
parent 72a301f8
......@@ -18,8 +18,8 @@
#include "cmCTestScriptHandler.h"
bool cmCTestEmptyBinaryDirectoryCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestEmptyBinaryDirectoryCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() != 1 )
{
......
......@@ -47,7 +47,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -35,8 +35,8 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
this->Last = ct_LAST;
}
bool cmCTestHandlerCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestHandlerCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if ( !this->ProcessArguments(args, (unsigned int)this->Last,
&*this->Arguments.begin(),this->Values) )
......
......@@ -35,7 +35,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);
......
......@@ -18,8 +18,8 @@
#include "cmCTest.h"
bool cmCTestReadCustomFilesCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestReadCustomFilesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if (args.size() < 1)
{
......
......@@ -45,7 +45,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -18,8 +18,8 @@
#include "cmCTestScriptHandler.h"
bool cmCTestRunScriptCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestRunScriptCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() < 1 )
{
......
......@@ -46,7 +46,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -65,7 +65,8 @@ public:
cmCTestScriptFunctionBlocker() {}
virtual ~cmCTestScriptFunctionBlocker() {}
virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
cmMakefile &mf);
cmMakefile &mf,
cmExecutionStatus &);
//virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
//virtual void ScopeEnded(cmMakefile &mf);
......@@ -74,7 +75,8 @@ public:
// simply update the time and don't block anything
bool cmCTestScriptFunctionBlocker::
IsFunctionBlocked(const cmListFileFunction& , cmMakefile &)
IsFunctionBlocked(const cmListFileFunction& , cmMakefile &,
cmExecutionStatus &)
{
this->CTestScriptHandler->UpdateElapsedTime();
return false;
......
......@@ -19,8 +19,8 @@
#include "cmCTestScriptHandler.h"
#include <stdlib.h> // required for atoi
bool cmCTestSleepCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestSleepCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if (args.size() < 1)
{
......
......@@ -46,7 +46,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -20,8 +20,8 @@
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
bool cmCTestStartCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestStartCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if (args.size() < 1)
{
......
......@@ -45,7 +45,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -53,7 +53,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &);
/**
* The name of the command as specified in CMakeList.txt.
......@@ -70,7 +71,8 @@ public:
};
//----------------------------------------------------------------------
bool cmCTestSubdirCommand::InitialPass(std::vector<std::string> const& args)
bool cmCTestSubdirCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() < 1 )
{
......@@ -139,7 +141,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &);
/**
* The name of the command as specified in CMakeList.txt.
......@@ -157,7 +160,7 @@ public:
//----------------------------------------------------------------------
bool cmCTestAddSubdirectoryCommand
::InitialPass(std::vector<std::string> const& args)
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() < 1 )
{
......@@ -223,7 +226,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const&);
virtual bool InitialPass(std::vector<std::string> const&,
cmExecutionStatus &);
/**
* The name of the command as specified in CMakeList.txt.
......@@ -240,7 +244,8 @@ public:
};
//----------------------------------------------------------------------
bool cmCTestAddTestCommand::InitialPass(std::vector<std::string> const& args)
bool cmCTestAddTestCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if ( args.size() < 2 )
{
......@@ -268,8 +273,9 @@ public:
/**
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const&);
*/
virtual bool InitialPass(std::vector<std::string> const&,
cmExecutionStatus &);
/**
* The name of the command as specified in CMakeList.txt.
......@@ -286,8 +292,8 @@ public:
};
//----------------------------------------------------------------------
bool cmCTestSetTestsPropertiesCommand::InitialPass(
std::vector<std::string> const& args)
bool cmCTestSetTestsPropertiesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
return this->TestHandler->SetTestsProperties(args);
}
......
......@@ -21,8 +21,8 @@
#include "cmSourceFile.h"
// cmAddCustomCommandCommand
bool cmAddCustomCommandCommand::InitialPass(
std::vector<std::string> const& args)
bool cmAddCustomCommandCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
/* Let's complain at the end of this function about the lack of a particular
arg. For the moment, let's say that COMMAND, and either TARGET or SOURCE
......
......@@ -42,7 +42,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -17,8 +17,8 @@
#include "cmAddCustomTargetCommand.h"
// cmAddCustomTargetCommand
bool cmAddCustomTargetCommand::InitialPass(
std::vector<std::string> const& args)
bool cmAddCustomTargetCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
if(args.size() < 1 )
{
......
......@@ -41,7 +41,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
......@@ -17,8 +17,8 @@
#include "cmAddDefinitionsCommand.h"
// cmAddDefinitionsCommand
bool cmAddDefinitionsCommand::InitialPass(
std::vector<std::string> const& args)
bool cmAddDefinitionsCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
// it is OK to have no arguments
if(args.size() < 1 )
......
......@@ -40,7 +40,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args);
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment