cmExportCommand.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 "cmCommand.h"
  9. #include "cmCommandArgumentsHelper.h"
  10. class cmExecutionStatus;
  11. class cmExportSet;
  12. /** \class cmExportLibraryDependenciesCommand
  13. * \brief Add a test to the lists of tests to run.
  14. *
  15. * cmExportLibraryDependenciesCommand adds a test to the list of tests to run
  16. *
  17. */
  18. class cmExportCommand : public cmCommand
  19. {
  20. public:
  21. cmExportCommand();
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. cmCommand* Clone() override { return new cmExportCommand; }
  26. /**
  27. * This is called when the command is first encountered in
  28. * the CMakeLists.txt file.
  29. */
  30. bool InitialPass(std::vector<std::string> const& args,
  31. cmExecutionStatus& status) override;
  32. private:
  33. cmCommandArgumentsHelper Helper;
  34. cmCommandArgumentGroup ArgumentGroup;
  35. cmCAStringVector Targets;
  36. cmCAEnabler Append;
  37. cmCAString ExportSetName;
  38. cmCAString Namespace;
  39. cmCAString Filename;
  40. cmCAEnabler ExportOld;
  41. cmCAString AndroidMKFile;
  42. cmExportSet* ExportSet;
  43. friend class cmExportBuildFileGenerator;
  44. std::string ErrorMessage;
  45. bool HandlePackage(std::vector<std::string> const& args);
  46. void StorePackageRegistryWin(std::string const& package, const char* content,
  47. const char* hash);
  48. void StorePackageRegistryDir(std::string const& package, const char* content,
  49. const char* hash);
  50. void ReportRegistryError(std::string const& msg, std::string const& key,
  51. long err);
  52. };
  53. #endif