2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2007-08-23 20:14:18 +00:00
|
|
|
#ifndef cmInstallCommandArguments_h
|
|
|
|
#define cmInstallCommandArguments_h
|
|
|
|
|
2016-11-05 20:40:14 +00:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
2016-09-01 18:05:48 +00:00
|
|
|
|
2016-11-05 20:40:14 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2016-04-29 13:40:20 +00:00
|
|
|
|
2007-08-23 20:14:18 +00:00
|
|
|
#include "cmCommandArgumentsHelper.h"
|
|
|
|
|
2007-08-24 18:27:18 +00:00
|
|
|
class cmInstallCommandArguments
|
2007-08-23 20:14:18 +00:00
|
|
|
{
|
2016-05-16 14:34:04 +00:00
|
|
|
public:
|
|
|
|
cmInstallCommandArguments(const std::string& defaultComponent);
|
|
|
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
|
|
|
{
|
|
|
|
this->GenericArguments = args;
|
|
|
|
}
|
|
|
|
void Parse(const std::vector<std::string>* args,
|
|
|
|
std::vector<std::string>* unconsumedArgs);
|
|
|
|
|
|
|
|
// Compute destination path.and check permissions
|
|
|
|
bool Finalize();
|
|
|
|
|
|
|
|
const std::string& GetDestination() const;
|
|
|
|
const std::string& GetComponent() const;
|
|
|
|
bool GetExcludeFromAll() const;
|
|
|
|
const std::string& GetRename() const;
|
|
|
|
const std::string& GetPermissions() const;
|
|
|
|
const std::vector<std::string>& GetConfigurations() const;
|
|
|
|
bool GetOptional() const;
|
|
|
|
bool GetNamelinkOnly() const;
|
|
|
|
bool GetNamelinkSkip() 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:
|
|
|
|
cmInstallCommandArguments(); // disabled
|
|
|
|
cmCAString Destination;
|
|
|
|
cmCAString Component;
|
|
|
|
cmCAEnabler ExcludeFromAll;
|
|
|
|
cmCAString Rename;
|
|
|
|
cmCAStringVector Permissions;
|
|
|
|
cmCAStringVector Configurations;
|
|
|
|
cmCAEnabler Optional;
|
|
|
|
cmCAEnabler NamelinkOnly;
|
|
|
|
cmCAEnabler NamelinkSkip;
|
|
|
|
|
|
|
|
std::string DestinationString;
|
|
|
|
std::string PermissionsString;
|
|
|
|
|
|
|
|
cmInstallCommandArguments* GenericArguments;
|
|
|
|
static const char* PermissionsTable[];
|
|
|
|
static const std::string EmptyString;
|
|
|
|
std::string DefaultComponentName;
|
|
|
|
bool CheckPermissions();
|
2007-08-23 20:14:18 +00:00
|
|
|
};
|
|
|
|
|
2013-01-05 11:13:49 +00:00
|
|
|
class cmInstallCommandIncludesArgument
|
|
|
|
{
|
2016-05-16 14:34:04 +00:00
|
|
|
public:
|
|
|
|
cmInstallCommandIncludesArgument();
|
|
|
|
void Parse(const std::vector<std::string>* args,
|
|
|
|
std::vector<std::string>* unconsumedArgs);
|
2013-01-05 11:13:49 +00:00
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
const std::vector<std::string>& GetIncludeDirs() const;
|
2013-01-05 11:13:49 +00:00
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
private:
|
|
|
|
std::vector<std::string> IncludeDirs;
|
2013-01-05 11:13:49 +00:00
|
|
|
};
|
|
|
|
|
2007-08-23 20:14:18 +00:00
|
|
|
#endif
|