1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
13 #ifndef cmInstallCommandArguments_h
14 #define cmInstallCommandArguments_h
16 #include "cmStandardIncludes.h"
17 #include "cmCommandArgumentsHelper.h"
19 class cmInstallCommandArguments
22 cmInstallCommandArguments(const std::string& defaultComponent);
23 void SetGenericArguments(cmInstallCommandArguments* args)
24 {this->GenericArguments = args;}
25 void Parse(const std::vector<std::string>* args,
26 std::vector<std::string>* unconsumedArgs);
28 // Compute destination path.and check permissions
31 const std::string& GetDestination() const;
32 const std::string& GetComponent() const;
33 const std::string& GetRename() const;
34 const std::string& GetPermissions() const;
35 const std::vector<std::string>& GetConfigurations() const;
36 bool GetOptional() const;
37 bool GetNamelinkOnly() const;
38 bool GetNamelinkSkip() const;
40 // once HandleDirectoryMode() is also switched to using
41 // cmInstallCommandArguments then these two functions can become non-static
42 // private member functions without arguments
43 static bool CheckPermissions(const std::string& onePerm,
45 cmCommandArgumentsHelper Parser;
46 cmCommandArgumentGroup ArgumentGroup;
48 cmInstallCommandArguments(); // disabled
49 cmCAString Destination;
52 cmCAStringVector Permissions;
53 cmCAStringVector Configurations;
55 cmCAEnabler NamelinkOnly;
56 cmCAEnabler NamelinkSkip;
58 std::string DestinationString;
59 std::string PermissionsString;
61 cmInstallCommandArguments* GenericArguments;
62 static const char* PermissionsTable[];
63 static const std::string EmptyString;
64 std::string DefaultComponentName;
65 bool CheckPermissions();