ENH: Add command to read ctest custom files
This commit is contained in:
parent
d9dd47422b
commit
fce93e890d
|
@ -0,0 +1,39 @@
|
|||
/*=========================================================================
|
||||
|
||||
Program: CMake - Cross-Platform Makefile Generator
|
||||
Module: $RCSfile$
|
||||
Language: C++
|
||||
Date: $Date$
|
||||
Version: $Revision$
|
||||
|
||||
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
||||
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the above copyright notices for more information.
|
||||
|
||||
=========================================================================*/
|
||||
#include "cmCTestReadCustomFilesCommand.h"
|
||||
|
||||
#include "cmCTest.h"
|
||||
|
||||
bool cmCTestReadCustomFilesCommand::InitialPass(
|
||||
std::vector<std::string> const& args)
|
||||
{
|
||||
if (args.size() < 1)
|
||||
{
|
||||
this->SetError("called with incorrect number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::string>::const_iterator dit;
|
||||
for ( dit = args.begin(); dit != args.end(); ++ dit )
|
||||
{
|
||||
this->CTest->ReadCustomConfigurationFileTree(dit->c_str());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*=========================================================================
|
||||
|
||||
Program: CMake - Cross-Platform Makefile Generator
|
||||
Module: $RCSfile$
|
||||
Language: C++
|
||||
Date: $Date$
|
||||
Version: $Revision$
|
||||
|
||||
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
||||
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the above copyright notices for more information.
|
||||
|
||||
=========================================================================*/
|
||||
#ifndef cmCTestReadCustomFilesCommand_h
|
||||
#define cmCTestReadCustomFilesCommand_h
|
||||
|
||||
#include "cmCTestCommand.h"
|
||||
|
||||
/** \class cmCTestReadCustomFiles
|
||||
* \brief Run a ctest script
|
||||
*
|
||||
* cmLibrarysCommand defines a list of executable (i.e., test)
|
||||
* programs to create.
|
||||
*/
|
||||
class cmCTestReadCustomFilesCommand : public cmCTestCommand
|
||||
{
|
||||
public:
|
||||
|
||||
cmCTestReadCustomFilesCommand() {}
|
||||
|
||||
/**
|
||||
* This is a virtual constructor for the command.
|
||||
*/
|
||||
virtual cmCommand* Clone()
|
||||
{
|
||||
cmCTestReadCustomFilesCommand* ni = new cmCTestReadCustomFilesCommand;
|
||||
ni->CTest = this->CTest;
|
||||
return ni;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when the command is first encountered in
|
||||
* the CMakeLists.txt file.
|
||||
*/
|
||||
virtual bool InitialPass(std::vector<std::string> const& args);
|
||||
|
||||
/**
|
||||
* The name of the command as specified in CMakeList.txt.
|
||||
*/
|
||||
virtual const char* GetName() { return "CTEST_READ_CUSTOM_FILES";}
|
||||
|
||||
/**
|
||||
* Succinct documentation.
|
||||
*/
|
||||
virtual const char* GetTerseDocumentation()
|
||||
{
|
||||
return "read CTestCustom files.";
|
||||
}
|
||||
|
||||
/**
|
||||
* More documentation.
|
||||
*/
|
||||
virtual const char* GetFullDocumentation()
|
||||
{
|
||||
return
|
||||
" CTEST_READ_CUSTOM_FILES( directory ... )\n"
|
||||
"Read all the CTestCustom.ctest or CTestCustom.cmake files from the given "
|
||||
"directory.";
|
||||
}
|
||||
|
||||
cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -48,6 +48,7 @@
|
|||
#include "cmCTestCoverageCommand.h"
|
||||
#include "cmCTestEmptyBinaryDirectoryCommand.h"
|
||||
#include "cmCTestMemCheckCommand.h"
|
||||
#include "cmCTestReadCustomFilesCommand.h"
|
||||
#include "cmCTestRunScriptCommand.h"
|
||||
#include "cmCTestSleepCommand.h"
|
||||
#include "cmCTestStartCommand.h"
|
||||
|
@ -277,6 +278,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||
this->AddCTestCommand(new cmCTestCoverageCommand);
|
||||
this->AddCTestCommand(new cmCTestEmptyBinaryDirectoryCommand);
|
||||
this->AddCTestCommand(new cmCTestMemCheckCommand);
|
||||
this->AddCTestCommand(new cmCTestReadCustomFilesCommand);
|
||||
this->AddCTestCommand(new cmCTestRunScriptCommand);
|
||||
this->AddCTestCommand(new cmCTestSleepCommand);
|
||||
this->AddCTestCommand(new cmCTestStartCommand);
|
||||
|
|
Loading…
Reference in New Issue