1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallCommandArguments.h,v $
6 Date: $Date: 2008-02-04 22:03:48 $
7 Version: $Revision: 1.5 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
18 #ifndef cmInstallCommandArguments_h
19 #define cmInstallCommandArguments_h
21 #include "cmStandardIncludes.h"
22 #include "cmCommandArgumentsHelper.h"
24 class cmInstallCommandArguments
27 cmInstallCommandArguments();
28 void SetGenericArguments(cmInstallCommandArguments
* args
)
29 {this->GenericArguments
= args
;}
30 void Parse(const std::vector
<std::string
>* args
,
31 std::vector
<std::string
>* unconsumedArgs
);
33 // Compute destination path.and check permissions
36 const std::string
& GetDestination() const;
37 const std::string
& GetComponent() const;
38 const std::string
& GetRename() const;
39 const std::string
& GetPermissions() const;
40 const std::vector
<std::string
>& GetConfigurations() const;
41 bool GetOptional() const;
42 bool GetNamelinkOnly() const;
43 bool GetNamelinkSkip() const;
45 // once HandleDirectoryMode() is also switched to using
46 // cmInstallCommandArguments then these two functions can become non-static
47 // private member functions without arguments
48 static bool CheckPermissions(const std::string
& onePerm
,
50 cmCommandArgumentsHelper Parser
;
51 cmCommandArgumentGroup ArgumentGroup
;
53 cmCAString Destination
;
56 cmCAStringVector Permissions
;
57 cmCAStringVector Configurations
;
59 cmCAEnabler NamelinkOnly
;
60 cmCAEnabler NamelinkSkip
;
62 std::string DestinationString
;
63 std::string PermissionsString
;
65 cmInstallCommandArguments
* GenericArguments
;
66 static const char* PermissionsTable
[];
67 static const std::string EmptyString
;
68 bool CheckPermissions();