summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c85ad61..e10b5ad 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2400,3 +2400,38 @@ bool cmMakefile::CheckInfiniteLoops()
}
return true;
}
+
+void cmMakefile::SetProperty(const char* prop, const char* value)
+{
+ if (!prop)
+ {
+ return;
+ }
+ if (!value)
+ {
+ value = "NOTFOUND";
+ }
+ m_Properties[prop] = value;
+}
+
+const char *cmMakefile::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 cmMakefile::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;
+}