2009-09-28 15:43:28 +00:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2007-08-23 20:14:18 +00:00
|
|
|
|
2009-09-28 15:43:28 +00:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2007-08-23 20:14:18 +00:00
|
|
|
|
2009-09-28 15:43:28 +00: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-23 20:14:18 +00:00
|
|
|
|
|
|
|
#ifndef cmInstallCommandArguments_h
|
|
|
|
#define cmInstallCommandArguments_h
|
|
|
|
|
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
#include "cmCommandArgumentsHelper.h"
|
|
|
|
|
2007-08-24 18:27:18 +00:00
|
|
|
class cmInstallCommandArguments
|
2007-08-23 20:14:18 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmInstallCommandArguments();
|
|
|
|
void SetGenericArguments(cmInstallCommandArguments* args)
|
|
|
|
{this->GenericArguments = args;}
|
2007-08-24 18:27:18 +00:00
|
|
|
void Parse(const std::vector<std::string>* args,
|
|
|
|
std::vector<std::string>* unconsumedArgs);
|
|
|
|
|
|
|
|
// Compute destination path.and check permissions
|
2007-08-23 20:14:18 +00:00
|
|
|
bool Finalize();
|
|
|
|
|
|
|
|
const std::string& GetDestination() const;
|
|
|
|
const std::string& GetComponent() const;
|
|
|
|
const std::string& GetRename() const;
|
|
|
|
const std::string& GetPermissions() const;
|
|
|
|
const std::vector<std::string>& GetConfigurations() const;
|
|
|
|
bool GetOptional() const;
|
2008-02-04 22:03:48 +00:00
|
|
|
bool GetNamelinkOnly() const;
|
|
|
|
bool GetNamelinkSkip() const;
|
2007-08-23 20:14:18 +00:00
|
|
|
|
2007-08-31 20:52:32 +00:00
|
|
|
// once HandleDirectoryMode() is also switched to using
|
|
|
|
// cmInstallCommandArguments then these two functions can become non-static
|
|
|
|
// private member functions without arguments
|
2007-08-23 20:14:18 +00:00
|
|
|
static bool CheckPermissions(const std::string& onePerm,
|
|
|
|
std::string& perm);
|
2007-08-24 18:27:18 +00:00
|
|
|
cmCommandArgumentsHelper Parser;
|
|
|
|
cmCommandArgumentGroup ArgumentGroup;
|
2007-08-23 20:14:18 +00:00
|
|
|
private:
|
|
|
|
cmCAString Destination;
|
|
|
|
cmCAString Component;
|
|
|
|
cmCAString Rename;
|
|
|
|
cmCAStringVector Permissions;
|
|
|
|
cmCAStringVector Configurations;
|
|
|
|
cmCAEnabler Optional;
|
2008-02-04 22:03:48 +00:00
|
|
|
cmCAEnabler NamelinkOnly;
|
|
|
|
cmCAEnabler NamelinkSkip;
|
2007-08-23 20:14:18 +00:00
|
|
|
|
2008-01-28 13:38:36 +00:00
|
|
|
std::string DestinationString;
|
2007-08-23 20:14:18 +00:00
|
|
|
std::string PermissionsString;
|
|
|
|
|
|
|
|
cmInstallCommandArguments* GenericArguments;
|
|
|
|
static const char* PermissionsTable[];
|
|
|
|
static const std::string EmptyString;
|
|
|
|
bool CheckPermissions();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|