cmSetPropertyCommand.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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"
  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() CM_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) CM_OVERRIDE;
  26. /**
  27. * The name of the command as specified in CMakeList.txt.
  28. */
  29. std::string GetName() const CM_OVERRIDE { return "set_property"; }
  30. private:
  31. std::set<std::string> Names;
  32. std::string PropertyName;
  33. std::string PropertyValue;
  34. bool Remove;
  35. bool AppendMode;
  36. bool AppendAsString;
  37. // Implementation of each property type.
  38. bool HandleGlobalMode();
  39. bool HandleDirectoryMode();
  40. bool HandleTargetMode();
  41. bool HandleTarget(cmTarget* target);
  42. bool HandleSourceMode();
  43. bool HandleSource(cmSourceFile* sf);
  44. bool HandleTestMode();
  45. bool HandleTest(cmTest* test);
  46. bool HandleCacheMode();
  47. bool HandleCacheEntry(std::string const&);
  48. bool HandleInstallMode();
  49. bool HandleInstall(cmInstalledFile* file);
  50. };
  51. #endif