summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx35
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 3e78990..86652d3 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2287,6 +2287,41 @@ bool cmake::GetPropertyAsBool(const std::string& prop)
return cmSystemTools::IsOn(this->GetProperty(prop));
}
+cmInstalledFile *cmake::GetOrCreateInstalledFile(
+ cmMakefile* mf, const std::string& name)
+{
+ std::map<std::string, cmInstalledFile>::iterator i =
+ this->InstalledFiles.find(name);
+
+ if(i != this->InstalledFiles.end())
+ {
+ cmInstalledFile &file = i->second;
+ return &file;
+ }
+ else
+ {
+ cmInstalledFile &file = this->InstalledFiles[name];
+ file.SetName(mf, name);
+ return &file;
+ }
+}
+
+cmInstalledFile const* cmake::GetInstalledFile(const std::string& name) const
+{
+ std::map<std::string, cmInstalledFile>::const_iterator i =
+ this->InstalledFiles.find(name);
+
+ if(i != this->InstalledFiles.end())
+ {
+ cmInstalledFile const& file = i->second;
+ return &file;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
int cmake::GetSystemInformation(std::vector<std::string>& args)
{
// so create the directory