2016-09-27 15:01:08 -04:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2007-06-08 11:57:16 -04:00
|
|
|
#ifndef cmExportCommand_h
|
|
|
|
#define cmExportCommand_h
|
|
|
|
|
2017-08-25 20:39:02 +02:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2017-04-11 21:42:35 +02:00
|
|
|
|
2016-10-19 08:54:18 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-07-04 18:14:22 +02:00
|
|
|
#include "cm_memory.hxx"
|
|
|
|
|
2007-06-08 11:57:16 -04:00
|
|
|
#include "cmCommand.h"
|
|
|
|
|
2016-10-19 08:54:18 +02:00
|
|
|
class cmExecutionStatus;
|
2008-01-30 17:25:52 -05:00
|
|
|
|
2007-06-08 11:57:16 -04:00
|
|
|
class cmExportCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2019-07-04 18:14:22 +02:00
|
|
|
std::unique_ptr<cmCommand> Clone() override
|
|
|
|
{
|
|
|
|
return cm::make_unique<cmExportCommand>();
|
|
|
|
}
|
2007-06-08 11:57:16 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-06-27 21:25:27 +02:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
2017-09-15 09:56:26 -04:00
|
|
|
cmExecutionStatus& status) override;
|
2007-06-08 11:57:16 -04:00
|
|
|
|
|
|
|
private:
|
2009-09-01 14:04:53 -04:00
|
|
|
bool HandlePackage(std::vector<std::string> const& args);
|
2016-05-16 10:34:04 -04:00
|
|
|
void StorePackageRegistryWin(std::string const& package, const char* content,
|
|
|
|
const char* hash);
|
|
|
|
void StorePackageRegistryDir(std::string const& package, const char* content,
|
|
|
|
const char* hash);
|
2009-09-01 14:04:53 -04:00
|
|
|
void ReportRegistryError(std::string const& msg, std::string const& key,
|
|
|
|
long err);
|
2007-06-08 11:57:16 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|