cmState: Support BuiltinCommands as free functions

This commit is contained in:
Regina Pfeifer
2019-04-08 09:55:52 +02:00
parent 28f2d12a05
commit dfaa87f1b3
7 changed files with 34 additions and 62 deletions
+3 -27
View File
@@ -8,34 +8,10 @@
#include <string>
#include <vector>
#include "cm_memory.hxx"
#include "cmCommand.h"
class cmExecutionStatus;
/** \class cmReturnCommand
* \brief Return from a directory or function
*
* cmReturnCommand returns from a directory or function
*/
class cmReturnCommand : public cmCommand
{
public:
/**
* This is a virtual constructor for the command.
*/
std::unique_ptr<cmCommand> Clone() override
{
return cm::make_unique<cmReturnCommand>();
}
/**
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) override;
};
/// Return from a directory or function
bool cmReturnCommand(std::vector<std::string> const& args,
cmExecutionStatus& status);
#endif