diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-05-15 19:12:40 +0200 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-28 12:28:18 -0400 |
commit | 15a8af21e8bd8354dfff2063e01f695f85efdeb8 (patch) | |
tree | b7d98cab3ba63f61074a4f63a250934f0294826a /Source/cmake.cxx | |
parent | 032961c6ac81d82270a7b1986935111aa5e32a56 (diff) | |
download | cmake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.tar.gz |
Add an "installed file" property scope
Teach set_property and get_property an "INSTALL" property type to be
associated with install-tree file paths. Make the properties available
to CPack for use during packaging. Add a "prop_inst" Sphinx domain
object type for documentation of such properties.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 3e789901d2..86652d3a38 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 |