cmImportedCxxModuleInfo.h 867 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <map>
  6. #include <string>
  7. #include <vector>
  8. struct ImportedCxxModuleInfo
  9. {
  10. std::string const Name;
  11. std::vector<std::string> const AvailableBmis;
  12. };
  13. struct ImportedCxxModuleGeneratorInfo
  14. {
  15. std::string const BmiName;
  16. };
  17. struct ImportedCxxModuleLookup
  18. {
  19. ImportedCxxModuleLookup() = default;
  20. ~ImportedCxxModuleLookup() = default;
  21. bool Initialized() const;
  22. void Initialize(std::string const& importedModules);
  23. std::string BmiNameForSource(std::string const& path);
  24. private:
  25. bool DoneInit = false;
  26. std::map<std::string, ImportedCxxModuleInfo> ImportedInfo;
  27. std::map<std::string, ImportedCxxModuleGeneratorInfo> GeneratorInfo;
  28. };