2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2007-08-24 00:14:18 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2007-08-24 00:14:18 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2007-08-24 00:14:18 +04:00
|
|
|
|
|
|
|
#ifndef cmInstallCommandArguments_h
|
|
|
|
#define cmInstallCommandArguments_h
|
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2007-08-24 00:14:18 +04:00
|
|
|
#include "cmCommandArgumentsHelper.h"
|
|
|
|
|
2007-08-24 22:27:18 +04:00
|
|
|
class cmInstallCommandArguments
|
2007-08-24 00:14:18 +04:00
|
|
|
{
|
|
|
|
public:
|
2012-05-13 17:44:37 +04:00
|
|
|
cmInstallCommandArguments(const std::string& defaultComponent);
|
2012-05-13 17:34:30 +04:00
|
|
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
2007-08-24 00:14:18 +04:00
|
|
|
{this->GenericArguments = args;}
|
2012-05-13 17:34:30 +04:00
|
|
|
void Parse(const std::vector<std::string>* args,
|
2007-08-24 22:27:18 +04:00
|
|
|
std::vector<std::string>* unconsumedArgs);
|
|
|
|
|
|
|
|
// Compute destination path.and check permissions
|
2007-08-24 00:14:18 +04:00
|
|
|
bool Finalize();
|
|
|
|
|
|
|
|
const std::string& GetDestination() const;
|
|
|
|
const std::string& GetComponent() const;
|
2016-02-01 13:01:39 +03:00
|
|
|
bool GetExcludeFromAll() const;
|
2007-08-24 00:14:18 +04:00
|
|
|
const std::string& GetRename() const;
|
|
|
|
const std::string& GetPermissions() const;
|
|
|
|
const std::vector<std::string>& GetConfigurations() const;
|
|
|
|
bool GetOptional() const;
|
2008-02-05 01:03:48 +03:00
|
|
|
bool GetNamelinkOnly() const;
|
|
|
|
bool GetNamelinkSkip() const;
|
2007-08-24 00:14:18 +04:00
|
|
|
|
2012-05-13 17:34:30 +04:00
|
|
|
// once HandleDirectoryMode() is also switched to using
|
2007-09-01 00:52:32 +04:00
|
|
|
// cmInstallCommandArguments then these two functions can become non-static
|
|
|
|
// private member functions without arguments
|
2012-05-13 17:34:30 +04:00
|
|
|
static bool CheckPermissions(const std::string& onePerm,
|
2007-08-24 00:14:18 +04:00
|
|
|
std::string& perm);
|
2007-08-24 22:27:18 +04:00
|
|
|
cmCommandArgumentsHelper Parser;
|
|
|
|
cmCommandArgumentGroup ArgumentGroup;
|
2007-08-24 00:14:18 +04:00
|
|
|
private:
|
2012-05-13 17:44:37 +04:00
|
|
|
cmInstallCommandArguments(); // disabled
|
2007-08-24 00:14:18 +04:00
|
|
|
cmCAString Destination;
|
|
|
|
cmCAString Component;
|
2016-02-01 13:01:39 +03:00
|
|
|
cmCAEnabler ExcludeFromAll;
|
2007-08-24 00:14:18 +04:00
|
|
|
cmCAString Rename;
|
|
|
|
cmCAStringVector Permissions;
|
|
|
|
cmCAStringVector Configurations;
|
|
|
|
cmCAEnabler Optional;
|
2008-02-05 01:03:48 +03:00
|
|
|
cmCAEnabler NamelinkOnly;
|
|
|
|
cmCAEnabler NamelinkSkip;
|
2007-08-24 00:14:18 +04:00
|
|
|
|
2008-01-28 16:38:36 +03:00
|
|
|
std::string DestinationString;
|
2007-08-24 00:14:18 +04:00
|
|
|
std::string PermissionsString;
|
|
|
|
|
|
|
|
cmInstallCommandArguments* GenericArguments;
|
|
|
|
static const char* PermissionsTable[];
|
|
|
|
static const std::string EmptyString;
|
2012-07-11 23:03:21 +04:00
|
|
|
std::string DefaultComponentName;
|
2007-08-24 00:14:18 +04:00
|
|
|
bool CheckPermissions();
|
|
|
|
};
|
|
|
|
|
2013-01-05 15:13:49 +04:00
|
|
|
class cmInstallCommandIncludesArgument
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmInstallCommandIncludesArgument();
|
|
|
|
void Parse(const std::vector<std::string>* args,
|
|
|
|
std::vector<std::string>* unconsumedArgs);
|
|
|
|
|
|
|
|
const std::vector<std::string>& GetIncludeDirs() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::string> IncludeDirs;
|
|
|
|
};
|
|
|
|
|
2007-08-24 00:14:18 +04:00
|
|
|
#endif
|