cmExportSet.cxx 833 B

1234567891011121314151617181920212223242526272829303132
  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 "cmExportSet.h"
  4. #include <utility>
  5. #include "cmLocalGenerator.h"
  6. #include "cmTargetExport.h"
  7. cmExportSet::cmExportSet(std::string name)
  8. : Name(std::move(name))
  9. {
  10. }
  11. cmExportSet::~cmExportSet() = default;
  12. void cmExportSet::Compute(cmLocalGenerator* lg)
  13. {
  14. for (std::unique_ptr<cmTargetExport>& tgtExport : this->TargetExports) {
  15. tgtExport->Target = lg->FindGeneratorTargetToUse(tgtExport->TargetName);
  16. }
  17. }
  18. void cmExportSet::AddTargetExport(std::unique_ptr<cmTargetExport> te)
  19. {
  20. this->TargetExports.emplace_back(std::move(te));
  21. }
  22. void cmExportSet::AddInstallation(cmInstallExportGenerator const* installation)
  23. {
  24. this->Installations.push_back(installation);
  25. }