cmSetPropertyCommand.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmSetsPropertiesCommand_h
  4. #define cmSetsPropertiesCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <set>
  7. #include <string>
  8. #include <vector>
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. class cmInstalledFile;
  12. class cmSourceFile;
  13. class cmTarget;
  14. class cmTest;
  15. class cmSetPropertyCommand : public cmCommand
  16. {
  17. public:
  18. cmSetPropertyCommand();
  19. cmCommand* Clone() override { return new cmSetPropertyCommand; }
  20. /**
  21. * This is called when the command is first encountered in
  22. * the input file.
  23. */
  24. bool InitialPass(std::vector<std::string> const& args,
  25. cmExecutionStatus& status) override;
  26. private:
  27. std::set<std::string> Names;
  28. std::string PropertyName;
  29. std::string PropertyValue;
  30. bool Remove;
  31. bool AppendMode;
  32. bool AppendAsString;
  33. // Implementation of each property type.
  34. bool HandleGlobalMode();
  35. bool HandleDirectoryMode();
  36. bool HandleTargetMode();
  37. bool HandleTarget(cmTarget* target);
  38. bool HandleSourceMode();
  39. bool HandleSource(cmSourceFile* sf);
  40. bool HandleTestMode();
  41. bool HandleTest(cmTest* test);
  42. bool HandleCacheMode();
  43. bool HandleCacheEntry(std::string const&);
  44. bool HandleInstallMode();
  45. bool HandleInstall(cmInstalledFile* file);
  46. };
  47. #endif