cmInstallCommandArguments.h 2.3 KB

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