diff options
author | Regina Pfeifer <regina@mailbox.org> | 2019-03-23 21:45:41 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-04-04 17:24:39 (GMT) |
commit | e6b6bb06188ec54a568b54d45930bf38d6547c27 (patch) | |
tree | cc85c3fcc41dfcbe874d0f0ba5a951e14b3ea238 /Source/cmInstallCommandArguments.h | |
parent | 4336a29edd5fd3a70db83103df8f36c5d8bebc59 (diff) | |
download | CMake-e6b6bb06188ec54a568b54d45930bf38d6547c27.zip CMake-e6b6bb06188ec54a568b54d45930bf38d6547c27.tar.gz CMake-e6b6bb06188ec54a568b54d45930bf38d6547c27.tar.bz2 |
cmInstallCommand: Port to cmArgumentParser
Diffstat (limited to 'Source/cmInstallCommandArguments.h')
-rw-r--r-- | Source/cmInstallCommandArguments.h | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h index 9c0d417..5d2ee0a 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; |