STYLE: fix MSVC warnings by making the cmCommandArgumentsHelper a member of
cmInstallCommandArguments instead of deriving from it Alex
This commit is contained in:
parent
9220e97401
commit
938ed7710a
|
@ -176,8 +176,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
|
||||||
|
|
||||||
std::vector<std::string> unknownArgs;
|
std::vector<std::string> unknownArgs;
|
||||||
cmInstallCommandArguments genericArgs;
|
cmInstallCommandArguments genericArgs;
|
||||||
cmCAStringVector targetList(&genericArgs, "TARGETS");
|
cmCAStringVector targetList(&genericArgs.Parser, "TARGETS");
|
||||||
cmCAString exports(&genericArgs, "EXPORT", &genericArgs.ArgumentGroup);
|
cmCAString exports(&genericArgs.Parser,"EXPORT", &genericArgs.ArgumentGroup);
|
||||||
targetList.Follows(0);
|
targetList.Follows(0);
|
||||||
genericArgs.ArgumentGroup.Follows(&targetList);
|
genericArgs.ArgumentGroup.Follows(&targetList);
|
||||||
genericArgs.Parse(&genericArgVector.GetVector(), &unknownArgs);
|
genericArgs.Parse(&genericArgVector.GetVector(), &unknownArgs);
|
||||||
|
@ -509,7 +509,7 @@ bool cmInstallCommand::HandleFilesMode(std::vector<std::string> const& args)
|
||||||
// This is the FILES mode.
|
// This is the FILES mode.
|
||||||
bool programs = (args[0] == "PROGRAMS");
|
bool programs = (args[0] == "PROGRAMS");
|
||||||
cmInstallCommandArguments ica;
|
cmInstallCommandArguments ica;
|
||||||
cmCAStringVector files(&ica, programs ? "PROGRAMS" : "FILES");
|
cmCAStringVector files(&ica.Parser, programs ? "PROGRAMS" : "FILES");
|
||||||
files.Follows(0);
|
files.Follows(0);
|
||||||
ica.ArgumentGroup.Follows(&files);
|
ica.ArgumentGroup.Follows(&files);
|
||||||
std::vector<std::string> unknownArgs;
|
std::vector<std::string> unknownArgs;
|
||||||
|
@ -954,9 +954,9 @@ bool cmInstallCommand::HandleExportMode(std::vector<std::string> const& args)
|
||||||
{
|
{
|
||||||
// This is the EXPORT mode.
|
// This is the EXPORT mode.
|
||||||
cmInstallCommandArguments ica;
|
cmInstallCommandArguments ica;
|
||||||
cmCAStringVector exports(&ica, "EXPORT");
|
cmCAStringVector exports(&ica.Parser, "EXPORT");
|
||||||
cmCAString prefix(&ica, "PREFIX", &ica.ArgumentGroup);
|
cmCAString prefix(&ica.Parser, "PREFIX", &ica.ArgumentGroup);
|
||||||
cmCAString filename(&ica, "FILENAME", &ica.ArgumentGroup);
|
cmCAString filename(&ica.Parser, "FILENAME", &ica.ArgumentGroup);
|
||||||
exports.Follows(0);
|
exports.Follows(0);
|
||||||
|
|
||||||
ica.ArgumentGroup.Follows(&exports);
|
ica.ArgumentGroup.Follows(&exports);
|
||||||
|
|
|
@ -29,14 +29,14 @@ const char* cmInstallCommandArguments::PermissionsTable[] =
|
||||||
const std::string cmInstallCommandArguments::EmptyString;
|
const std::string cmInstallCommandArguments::EmptyString;
|
||||||
|
|
||||||
cmInstallCommandArguments::cmInstallCommandArguments()
|
cmInstallCommandArguments::cmInstallCommandArguments()
|
||||||
:cmCommandArgumentsHelper()
|
:Parser()
|
||||||
,ArgumentGroup()
|
,ArgumentGroup()
|
||||||
,Destination (this, "DESTINATION" , &ArgumentGroup)
|
,Destination (&Parser, "DESTINATION" , &ArgumentGroup)
|
||||||
,Component (this, "COMPONENT" , &ArgumentGroup)
|
,Component (&Parser, "COMPONENT" , &ArgumentGroup)
|
||||||
,Rename (this, "RENAME" , &ArgumentGroup)
|
,Rename (&Parser, "RENAME" , &ArgumentGroup)
|
||||||
,Permissions (this, "PERMISSIONS" , &ArgumentGroup)
|
,Permissions (&Parser, "PERMISSIONS" , &ArgumentGroup)
|
||||||
,Configurations(this, "CONFIGURATIONS", &ArgumentGroup)
|
,Configurations(&Parser, "CONFIGURATIONS", &ArgumentGroup)
|
||||||
,Optional (this, "OPTIONAL" , &ArgumentGroup)
|
,Optional (&Parser, "OPTIONAL" , &ArgumentGroup)
|
||||||
,GenericArguments(0)
|
,GenericArguments(0)
|
||||||
{
|
{
|
||||||
this->Component.SetDefaultString("Unspecified");
|
this->Component.SetDefaultString("Unspecified");
|
||||||
|
@ -133,6 +133,13 @@ bool cmInstallCommandArguments::Finalize()
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmInstallCommandArguments::Parse(const std::vector<std::string>* args,
|
||||||
|
std::vector<std::string>* unconsumedArgs)
|
||||||
|
{
|
||||||
|
this->Parser.Parse(args, unconsumedArgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool cmInstallCommandArguments::CheckPermissions()
|
bool cmInstallCommandArguments::CheckPermissions()
|
||||||
{
|
{
|
||||||
this->PermissionsString = "";
|
this->PermissionsString = "";
|
||||||
|
|
|
@ -21,15 +21,17 @@
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCommandArgumentsHelper.h"
|
#include "cmCommandArgumentsHelper.h"
|
||||||
|
|
||||||
class cmInstallCommandArguments : public cmCommandArgumentsHelper
|
class cmInstallCommandArguments
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmInstallCommandArguments();
|
cmInstallCommandArguments();
|
||||||
void SetGenericArguments(cmInstallCommandArguments* args)
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
||||||
{this->GenericArguments = args;}
|
{this->GenericArguments = args;}
|
||||||
// Compute destination path.
|
void Parse(const std::vector<std::string>* args,
|
||||||
|
std::vector<std::string>* unconsumedArgs);
|
||||||
|
|
||||||
|
// Compute destination path.and check permissions
|
||||||
bool Finalize();
|
bool Finalize();
|
||||||
cmCommandArgumentGroup ArgumentGroup;
|
|
||||||
|
|
||||||
const std::string& GetDestination() const;
|
const std::string& GetDestination() const;
|
||||||
const std::string& GetComponent() const;
|
const std::string& GetComponent() const;
|
||||||
|
@ -45,6 +47,8 @@ class cmInstallCommandArguments : public cmCommandArgumentsHelper
|
||||||
std::string& absDest);
|
std::string& absDest);
|
||||||
static bool CheckPermissions(const std::string& onePerm,
|
static bool CheckPermissions(const std::string& onePerm,
|
||||||
std::string& perm);
|
std::string& perm);
|
||||||
|
cmCommandArgumentsHelper Parser;
|
||||||
|
cmCommandArgumentGroup ArgumentGroup;
|
||||||
private:
|
private:
|
||||||
cmCAString Destination;
|
cmCAString Destination;
|
||||||
cmCAString Component;
|
cmCAString Component;
|
||||||
|
|
Loading…
Reference in New Issue