cmCommand refactor: cmGetFilenameComponentCommand

This commit is contained in:
Gabor Bencze
2019-07-25 19:24:45 +02:00
committed by Brad King
parent 067d1fa9c0
commit 6377efd154
3 changed files with 16 additions and 37 deletions
+3 -23
View File
@@ -8,35 +8,15 @@
#include <string>
#include <vector>
#include "cm_memory.hxx"
#include "cmCommand.h"
class cmExecutionStatus;
/** \class cmGetFilenameComponentCommand
/**
* \brief Get a specific component of a filename.
*
* cmGetFilenameComponentCommand is a utility command used to get the path,
* name, extension or name without extension of a full filename.
*/
class cmGetFilenameComponentCommand : public cmCommand
{
public:
/**
* This is a virtual constructor for the command.
*/
std::unique_ptr<cmCommand> Clone() override
{
return cm::make_unique<cmGetFilenameComponentCommand>();
}
/**
* 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;
};
bool cmGetFilenameComponentCommand(std::vector<std::string> const& args,
cmExecutionStatus& status);
#endif