cmExportSetMap.cxx 510 B

1234567891011121314151617
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmExportSetMap.h"
  4. #include <tuple>
  5. #include <utility>
  6. cmExportSet& cmExportSetMap::operator[](const std::string& name)
  7. {
  8. auto it = this->find(name);
  9. if (it == this->end()) // Export set not found
  10. {
  11. auto tup_name = std::make_tuple(name);
  12. it = this->emplace(std::piecewise_construct, tup_name, tup_name).first;
  13. }
  14. return it->second;
  15. }