mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-21 21:58:50 -05:00
export: Factor out CMake-specific export generation (1/2)
In order to support generation of Common Package Specifications, the mechanisms CMake uses to export package information need to be made more abstract. As a first step toward this, refactor cmInstallExportGenerator so that logic specific to config.cmake and Android .mk lives in separate subclasses. While we're at it, clean up the code style a bit and try to use moves a bit more consistently. This is step 1 of 2. The next step will refactor the individual file generators along similar lines, which will also involve creating additional classes for format-agnostic logic that is shared between build-tree and install-tree variants.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "cmInstallExportGenerator.h"
|
||||
|
||||
class cmExportSet;
|
||||
class cmListFileBacktrace;
|
||||
|
||||
/** \class cmInstallAndroidMKExportGenerator
|
||||
* \brief Generate rules for creating Android .mk export files.
|
||||
*/
|
||||
class cmInstallAndroidMKExportGenerator : public cmInstallExportGenerator
|
||||
{
|
||||
public:
|
||||
cmInstallAndroidMKExportGenerator(
|
||||
cmExportSet* exportSet, std::string destination,
|
||||
std::string filePermissions,
|
||||
std::vector<std::string> const& configurations, std::string component,
|
||||
MessageLevel message, bool excludeFromAll, std::string filename,
|
||||
std::string targetNamespace, bool exportOld,
|
||||
cmListFileBacktrace backtrace);
|
||||
cmInstallAndroidMKExportGenerator(cmInstallAndroidMKExportGenerator const&) =
|
||||
delete;
|
||||
~cmInstallAndroidMKExportGenerator() override;
|
||||
|
||||
cmInstallAndroidMKExportGenerator& operator=(
|
||||
cmInstallAndroidMKExportGenerator const&) = delete;
|
||||
|
||||
protected:
|
||||
char const* InstallSubcommand() const override { return "EXPORT"; }
|
||||
|
||||
void GenerateScript(std::ostream& os) override;
|
||||
|
||||
bool const ExportOld;
|
||||
};
|
||||
Reference in New Issue
Block a user