cmProperty.h 785 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 cmProperty_h
  4. #define cmProperty_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. class cmProperty
  8. {
  9. public:
  10. enum ScopeType
  11. {
  12. TARGET,
  13. SOURCE_FILE,
  14. DIRECTORY,
  15. GLOBAL,
  16. CACHE,
  17. TEST,
  18. VARIABLE,
  19. CACHED_VARIABLE,
  20. INSTALL
  21. };
  22. // set this property
  23. void Set(const char* value);
  24. // append to this property
  25. void Append(const char* value, bool asString = false);
  26. // get the value
  27. const char* GetValue() const;
  28. // construct with the value not set
  29. cmProperty() { this->ValueHasBeenSet = false; }
  30. protected:
  31. std::string Value;
  32. bool ValueHasBeenSet;
  33. };
  34. #endif