cmExportCommand.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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>
  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() CM_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) CM_OVERRIDE;
  32. /**
  33. * The name of the command as specified in CMakeList.txt.
  34. */
  35. std::string GetName() const CM_OVERRIDE { return "export"; }
  36. private:
  37. cmCommandArgumentsHelper Helper;
  38. cmCommandArgumentGroup ArgumentGroup;
  39. cmCAStringVector Targets;
  40. cmCAEnabler Append;
  41. cmCAString ExportSetName;
  42. cmCAString Namespace;
  43. cmCAString Filename;
  44. cmCAEnabler ExportOld;
  45. cmCAString AndroidMKFile;
  46. cmExportSet* ExportSet;
  47. friend class cmExportBuildFileGenerator;
  48. std::string ErrorMessage;
  49. bool HandlePackage(std::vector<std::string> const& args);
  50. void StorePackageRegistryWin(std::string const& package, const char* content,
  51. const char* hash);
  52. void StorePackageRegistryDir(std::string const& package, const char* content,
  53. const char* hash);
  54. void ReportRegistryError(std::string const& msg, std::string const& key,
  55. long err);
  56. };
  57. #endif