mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 15:18:26 -05:00
cmCommand_refactor: cmGetPropertyCommand
This commit is contained in:
@@ -8,55 +8,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cm_memory.hxx"
|
||||
|
||||
#include "cmCommand.h"
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
||||
class cmGetPropertyCommand : public cmCommand
|
||||
{
|
||||
public:
|
||||
cmGetPropertyCommand();
|
||||
|
||||
std::unique_ptr<cmCommand> Clone() override
|
||||
{
|
||||
return cm::make_unique<cmGetPropertyCommand>();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is called when the command is first encountered in
|
||||
* the input file.
|
||||
*/
|
||||
bool InitialPass(std::vector<std::string> const& args,
|
||||
cmExecutionStatus& status) override;
|
||||
|
||||
private:
|
||||
enum OutType
|
||||
{
|
||||
OutValue,
|
||||
OutDefined,
|
||||
OutBriefDoc,
|
||||
OutFullDoc,
|
||||
OutSet
|
||||
};
|
||||
std::string Variable;
|
||||
std::string Name;
|
||||
std::string PropertyName;
|
||||
OutType InfoType;
|
||||
|
||||
// Implementation of result storage.
|
||||
bool StoreResult(const char* value);
|
||||
|
||||
// Implementation of each property type.
|
||||
bool HandleGlobalMode();
|
||||
bool HandleDirectoryMode();
|
||||
bool HandleTargetMode();
|
||||
bool HandleSourceMode();
|
||||
bool HandleTestMode();
|
||||
bool HandleVariableMode();
|
||||
bool HandleCacheMode();
|
||||
bool HandleInstallMode();
|
||||
};
|
||||
bool cmGetPropertyCommand(std::vector<std::string> const& args,
|
||||
cmExecutionStatus& status);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user