cmPropertyDefinitionMap.cxx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 "cmPropertyDefinitionMap.h"
  4. #include <utility>
  5. void cmPropertyDefinitionMap::DefineProperty(const std::string& name,
  6. cmProperty::ScopeType scope,
  7. const char* ShortDescription,
  8. const char* FullDescription,
  9. bool chain)
  10. {
  11. cmPropertyDefinitionMap::iterator it = this->find(name);
  12. cmPropertyDefinition* prop;
  13. if (it == this->end()) {
  14. prop = &(*this)[name];
  15. prop->DefineProperty(name, scope, ShortDescription, FullDescription,
  16. chain);
  17. }
  18. }
  19. bool cmPropertyDefinitionMap::IsPropertyDefined(const std::string& name) const
  20. {
  21. return this->find(name) != this->end();
  22. }
  23. bool cmPropertyDefinitionMap::IsPropertyChained(const std::string& name) const
  24. {
  25. cmPropertyDefinitionMap::const_iterator it = this->find(name);
  26. if (it == this->end()) {
  27. return false;
  28. }
  29. return it->second.IsChained();
  30. }