cmExportCommand.h 1.76 KB
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3 4 5
#ifndef cmExportCommand_h
#define cmExportCommand_h

6
#include "cmConfigure.h" // IWYU pragma: keep
7

8 9 10
#include <string>
#include <vector>

11
#include "cmCommand.h"
12
#include "cmCommandArgumentsHelper.h"
13

14
class cmExecutionStatus;
15
class cmExportSet;
16

17 18 19 20 21 22 23 24 25
/** \class cmExportLibraryDependenciesCommand
 * \brief Add a test to the lists of tests to run.
 *
 * cmExportLibraryDependenciesCommand adds a test to the list of tests to run
 *
 */
class cmExportCommand : public cmCommand
{
public:
26
  cmExportCommand();
27 28 29
  /**
   * This is a virtual constructor for the command.
   */
30
  cmCommand* Clone() override { return new cmExportCommand; }
31 32 33 34 35

  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
36
  bool InitialPass(std::vector<std::string> const& args,
37
                   cmExecutionStatus& status) override;
38 39

private:
40
  cmCommandArgumentsHelper Helper;
41 42
  cmCommandArgumentGroup ArgumentGroup;
  cmCAStringVector Targets;
43
  cmCAEnabler Append;
44
  cmCAString ExportSetName;
45
  cmCAString Namespace;
46
  cmCAString Filename;
47
  cmCAEnabler ExportOld;
48
  cmCAString AndroidMKFile;
49

50
  cmExportSet* ExportSet;
51

52 53
  friend class cmExportBuildFileGenerator;
  std::string ErrorMessage;
54 55

  bool HandlePackage(std::vector<std::string> const& args);
56 57 58 59
  void StorePackageRegistryWin(std::string const& package, const char* content,
                               const char* hash);
  void StorePackageRegistryDir(std::string const& package, const char* content,
                               const char* hash);
60 61
  void ReportRegistryError(std::string const& msg, std::string const& key,
                           long err);
62 63 64
};

#endif