diff options
author | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-13 19:09:15 (GMT) |
---|---|---|
committer | Tushar Maheshwari <tushar27192@gmail.com> | 2019-09-19 13:50:30 (GMT) |
commit | 71f088f53ae7f59e002ec893933d0f670347ea93 (patch) | |
tree | 52917f8ec74efaa57676a9ca26dad2a51dd75241 /Source/cmExportSet.cxx | |
parent | 6511fa6f3309984fc10de8471017c2bb32d8d286 (diff) | |
download | CMake-71f088f53ae7f59e002ec893933d0f670347ea93.zip CMake-71f088f53ae7f59e002ec893933d0f670347ea93.tar.gz CMake-71f088f53ae7f59e002ec893933d0f670347ea93.tar.bz2 |
cmExportSet: subsume cmExportSetMap source files
Diffstat (limited to 'Source/cmExportSet.cxx')
-rw-r--r-- | Source/cmExportSet.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmExportSet.cxx b/Source/cmExportSet.cxx index 05f1b5d..a20aa9a 100644 --- a/Source/cmExportSet.cxx +++ b/Source/cmExportSet.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmExportSet.h" +#include <tuple> #include <utility> #include "cmLocalGenerator.h" @@ -30,3 +31,14 @@ void cmExportSet::AddInstallation(cmInstallExportGenerator const* installation) { this->Installations.push_back(installation); } + +cmExportSet& cmExportSetMap::operator[](const std::string& name) +{ + auto it = this->find(name); + if (it == this->end()) // Export set not found + { + auto tup_name = std::make_tuple(name); + it = this->emplace(std::piecewise_construct, tup_name, tup_name).first; + } + return it->second; +} |