diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2014-05-15 17:12:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-28 16:28:18 (GMT) |
commit | 15a8af21e8bd8354dfff2063e01f695f85efdeb8 (patch) | |
tree | b7d98cab3ba63f61074a4f63a250934f0294826a /Source/cmake.cxx | |
parent | 032961c6ac81d82270a7b1986935111aa5e32a56 (diff) | |
download | CMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.zip CMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.tar.gz CMake-15a8af21e8bd8354dfff2063e01f695f85efdeb8.tar.bz2 |
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 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 |