diff options
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 1e97557..602f826 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -544,3 +544,39 @@ void cmTarget::GatherDependencies( const cmMakefile& mf, DeleteDependency( dep_map, lib, lib); // cannot depend on itself } } + + +void cmTarget::SetProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + if (!value) + { + value = "NOTFOUND"; + } + m_Properties[prop] = value; +} + +const char *cmTarget::GetProperty(const char* prop) const +{ + std::map<cmStdString,cmStdString>::const_iterator i = + m_Properties.find(prop); + if (i != m_Properties.end()) + { + return i->second.c_str(); + } + return 0; +} + +bool cmTarget::GetPropertyAsBool(const char* prop) const +{ + std::map<cmStdString,cmStdString>::const_iterator i = + m_Properties.find(prop); + if (i != m_Properties.end()) + { + return cmSystemTools::IsOn(i->second.c_str()); + } + return false; +} |