cmProperty.cxx 603 B

1234567891011121314151617181920212223242526
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmProperty.h"
  4. void cmProperty::Set(const char* value)
  5. {
  6. this->Value = value;
  7. this->ValueHasBeenSet = true;
  8. }
  9. void cmProperty::Append(const char* value, bool asString)
  10. {
  11. if (!this->Value.empty() && *value && !asString) {
  12. this->Value += ";";
  13. }
  14. this->Value += value;
  15. this->ValueHasBeenSet = true;
  16. }
  17. const char* cmProperty::GetValue() const
  18. {
  19. if (this->ValueHasBeenSet) {
  20. return this->Value.c_str();
  21. }
  22. return nullptr;
  23. }