cmExportCommand.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmExportCommand_h
  4. #define cmExportCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cm_memory.hxx"
  9. #include "cmCommand.h"
  10. class cmExecutionStatus;
  11. class cmExportCommand : public cmCommand
  12. {
  13. public:
  14. /**
  15. * This is a virtual constructor for the command.
  16. */
  17. std::unique_ptr<cmCommand> Clone() override
  18. {
  19. return cm::make_unique<cmExportCommand>();
  20. }
  21. /**
  22. * This is called when the command is first encountered in
  23. * the CMakeLists.txt file.
  24. */
  25. bool InitialPass(std::vector<std::string> const& args,
  26. cmExecutionStatus& status) override;
  27. private:
  28. bool HandlePackage(std::vector<std::string> const& args);
  29. void StorePackageRegistryWin(std::string const& package, const char* content,
  30. const char* hash);
  31. void StorePackageRegistryDir(std::string const& package, const char* content,
  32. const char* hash);
  33. void ReportRegistryError(std::string const& msg, std::string const& key,
  34. long err);
  35. };
  36. #endif