summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommandArguments.h
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-03-23 22:45:41 +0100
committerKyle Edwards <kyle.edwards@kitware.com>2019-04-04 13:24:39 -0400
commite6b6bb06188ec54a568b54d45930bf38d6547c27 (patch)
treecc85c3fcc41dfcbe874d0f0ba5a951e14b3ea238 /Source/cmInstallCommandArguments.h
parent4336a29edd5fd3a70db83103df8f36c5d8bebc59 (diff)
downloadcmake-e6b6bb06188ec54a568b54d45930bf38d6547c27.tar.gz
cmInstallCommand: Port to cmArgumentParser
Diffstat (limited to 'Source/cmInstallCommandArguments.h')
-rw-r--r--Source/cmInstallCommandArguments.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h
index 9c0d41763a..5d2ee0ab48 100644
--- a/Source/cmInstallCommandArguments.h
+++ b/Source/cmInstallCommandArguments.h
@@ -8,9 +8,9 @@
#include <string>
#include <vector>
-#include "cmCommandArgumentsHelper.h"
+#include "cmArgumentParser.h"
-class cmInstallCommandArguments
+class cmInstallCommandArguments : public cmArgumentParser<void>
{
public:
cmInstallCommandArguments(std::string defaultComponent);
@@ -18,8 +18,6 @@ public:
{
this->GenericArguments = args;
}
- void Parse(const std::vector<std::string>* args,
- std::vector<std::string>* unconsumedArgs);
// Compute destination path.and check permissions
bool Finalize();
@@ -37,30 +35,25 @@ public:
bool HasNamelinkComponent() const;
const std::string& GetType() const;
- // once HandleDirectoryMode() is also switched to using
- // cmInstallCommandArguments then these two functions can become non-static
- // private member functions without arguments
static bool CheckPermissions(const std::string& onePerm, std::string& perm);
- cmCommandArgumentsHelper Parser;
- cmCommandArgumentGroup ArgumentGroup;
private:
- cmCAString Destination;
- cmCAString Component;
- cmCAString NamelinkComponent;
- cmCAEnabler ExcludeFromAll;
- cmCAString Rename;
- cmCAStringVector Permissions;
- cmCAStringVector Configurations;
- cmCAEnabler Optional;
- cmCAEnabler NamelinkOnly;
- cmCAEnabler NamelinkSkip;
- cmCAString Type;
+ std::string Destination;
+ std::string Component;
+ std::string NamelinkComponent;
+ bool ExcludeFromAll = false;
+ std::string Rename;
+ std::vector<std::string> Permissions;
+ std::vector<std::string> Configurations;
+ bool Optional = false;
+ bool NamelinkOnly = false;
+ bool NamelinkSkip = false;
+ std::string Type;
std::string DestinationString;
std::string PermissionsString;
- cmInstallCommandArguments* GenericArguments;
+ cmInstallCommandArguments* GenericArguments = nullptr;
static const char* PermissionsTable[];
static const std::string EmptyString;
std::string DefaultComponentName;