mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06: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:
@@ -26,10 +26,11 @@
|
||||
#include "cmFileSet.h"
|
||||
#include "cmGeneratorExpression.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmInstallAndroidMKExportGenerator.h"
|
||||
#include "cmInstallCMakeConfigExportGenerator.h"
|
||||
#include "cmInstallCommandArguments.h"
|
||||
#include "cmInstallCxxModuleBmiGenerator.h"
|
||||
#include "cmInstallDirectoryGenerator.h"
|
||||
#include "cmInstallExportGenerator.h"
|
||||
#include "cmInstallFileSetGenerator.h"
|
||||
#include "cmInstallFilesGenerator.h"
|
||||
#include "cmInstallGenerator.h"
|
||||
@@ -2028,11 +2029,11 @@ bool HandleExportAndroidMKMode(std::vector<std::string> const& args,
|
||||
|
||||
// Create the export install generator.
|
||||
helper.Makefile->AddInstallGenerator(
|
||||
cm::make_unique<cmInstallExportGenerator>(
|
||||
cm::make_unique<cmInstallAndroidMKExportGenerator>(
|
||||
&exportSet, ica.GetDestination(), ica.GetPermissions(),
|
||||
ica.GetConfigurations(), ica.GetComponent(), message,
|
||||
ica.GetExcludeFromAll(), fname, name_space, "", exportOld, true, false,
|
||||
helper.Makefile->GetBacktrace()));
|
||||
ica.GetExcludeFromAll(), std::move(fname), std::move(name_space),
|
||||
exportOld, helper.Makefile->GetBacktrace()));
|
||||
|
||||
return true;
|
||||
#else
|
||||
@@ -2151,11 +2152,11 @@ bool HandleExportMode(std::vector<std::string> const& args,
|
||||
|
||||
// Create the export install generator.
|
||||
helper.Makefile->AddInstallGenerator(
|
||||
cm::make_unique<cmInstallExportGenerator>(
|
||||
cm::make_unique<cmInstallCMakeConfigExportGenerator>(
|
||||
&exportSet, ica.GetDestination(), ica.GetPermissions(),
|
||||
ica.GetConfigurations(), ica.GetComponent(), message,
|
||||
ica.GetExcludeFromAll(), fname, name_space, cxx_modules_directory,
|
||||
exportOld, false, exportPackageDependencies,
|
||||
ica.GetExcludeFromAll(), std::move(fname), std::move(name_space),
|
||||
std::move(cxx_modules_directory), exportOld, exportPackageDependencies,
|
||||
helper.Makefile->GetBacktrace()));
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user