Introduce "generator expressions" to add_test()
[cmake.git] / Source / cmInstallCommandArguments.h
blobb965db3082a48c7b91b48befab102fe22958cb9b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallCommandArguments.h,v $
5 Language: C++
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
26 public:
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
34 bool Finalize();
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,
49 std::string& perm);
50 cmCommandArgumentsHelper Parser;
51 cmCommandArgumentGroup ArgumentGroup;
52 private:
53 cmCAString Destination;
54 cmCAString Component;
55 cmCAString Rename;
56 cmCAStringVector Permissions;
57 cmCAStringVector Configurations;
58 cmCAEnabler Optional;
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();
71 #endif