cmProperty.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmProperty_h
  11. #define cmProperty_h
  12. #include "cmStandardIncludes.h"
  13. class cmProperty
  14. {
  15. public:
  16. enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
  17. TEST, VARIABLE, CACHED_VARIABLE };
  18. // set this property
  19. void Set(const std::string& name, const char *value);
  20. // append to this property
  21. void Append(const std::string& name, const char *value,
  22. bool asString = false);
  23. // get the value
  24. const char *GetValue() const;
  25. // construct with the value not set
  26. cmProperty() { this->ValueHasBeenSet = false; };
  27. protected:
  28. std::string Name;
  29. std::string Value;
  30. bool ValueHasBeenSet;
  31. };
  32. #endif