cmInstallFilesGenerator: Require cmLocalGenerator, not cmMakefile.
This commit is contained in:
parent
29c1385675
commit
75e511eeaf
|
@ -42,7 +42,7 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator(
|
||||||
{
|
{
|
||||||
cmInstallGenerator::MessageLevel message =
|
cmInstallGenerator::MessageLevel message =
|
||||||
cmInstallGenerator::SelectMessageLevel(mf);
|
cmInstallGenerator::SelectMessageLevel(mf);
|
||||||
return new cmInstallFilesGenerator(mf,
|
return new cmInstallFilesGenerator(
|
||||||
absFiles, args.GetDestination().c_str(),
|
absFiles, args.GetDestination().c_str(),
|
||||||
programs, args.GetPermissions().c_str(),
|
programs, args.GetPermissions().c_str(),
|
||||||
args.GetConfigurations(), args.GetComponent().c_str(),
|
args.GetConfigurations(), args.GetComponent().c_str(),
|
||||||
|
|
|
@ -128,7 +128,7 @@ void cmInstallFilesCommand::CreateInstallGenerator() const
|
||||||
cmInstallGenerator::MessageLevel message =
|
cmInstallGenerator::MessageLevel message =
|
||||||
cmInstallGenerator::SelectMessageLevel(this->Makefile);
|
cmInstallGenerator::SelectMessageLevel(this->Makefile);
|
||||||
this->Makefile->AddInstallGenerator(
|
this->Makefile->AddInstallGenerator(
|
||||||
new cmInstallFilesGenerator(this->Makefile, this->Files,
|
new cmInstallFilesGenerator(this->Files,
|
||||||
destination.c_str(), false,
|
destination.c_str(), false,
|
||||||
no_permissions, no_configurations,
|
no_permissions, no_configurations,
|
||||||
no_component.c_str(), message, no_rename));
|
no_component.c_str(), message, no_rename));
|
||||||
|
|
|
@ -14,11 +14,11 @@
|
||||||
#include "cmGeneratorExpression.h"
|
#include "cmGeneratorExpression.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
|
#include "cmLocalGenerator.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmInstallFilesGenerator
|
cmInstallFilesGenerator
|
||||||
::cmInstallFilesGenerator(cmMakefile* mf,
|
::cmInstallFilesGenerator(std::vector<std::string> const& files,
|
||||||
std::vector<std::string> const& files,
|
|
||||||
const char* dest, bool programs,
|
const char* dest, bool programs,
|
||||||
const char* file_permissions,
|
const char* file_permissions,
|
||||||
std::vector<std::string> const& configurations,
|
std::vector<std::string> const& configurations,
|
||||||
|
@ -27,7 +27,7 @@ cmInstallFilesGenerator
|
||||||
const char* rename,
|
const char* rename,
|
||||||
bool optional):
|
bool optional):
|
||||||
cmInstallGenerator(dest, configurations, component, message),
|
cmInstallGenerator(dest, configurations, component, message),
|
||||||
Makefile(mf),
|
LocalGenerator(0),
|
||||||
Files(files),
|
Files(files),
|
||||||
FilePermissions(file_permissions),
|
FilePermissions(file_permissions),
|
||||||
Rename(rename),
|
Rename(rename),
|
||||||
|
@ -51,6 +51,11 @@ cmInstallFilesGenerator
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmInstallFilesGenerator::Compute(cmLocalGenerator* lg)
|
||||||
|
{
|
||||||
|
this->LocalGenerator = lg;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmInstallFilesGenerator::AddFilesInstallRule(
|
void cmInstallFilesGenerator::AddFilesInstallRule(
|
||||||
std::ostream& os, Indent const& indent,
|
std::ostream& os, Indent const& indent,
|
||||||
|
@ -94,8 +99,8 @@ void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os,
|
||||||
i != this->Files.end(); ++i)
|
i != this->Files.end(); ++i)
|
||||||
{
|
{
|
||||||
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
|
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i);
|
||||||
cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config),
|
cmSystemTools::ExpandListArgument(cge->Evaluate(
|
||||||
files);
|
this->LocalGenerator->GetMakefile(), config), files);
|
||||||
}
|
}
|
||||||
this->AddFilesInstallRule(os, indent, files);
|
this->AddFilesInstallRule(os, indent, files);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,16 +14,13 @@
|
||||||
|
|
||||||
#include "cmInstallGenerator.h"
|
#include "cmInstallGenerator.h"
|
||||||
|
|
||||||
class cmMakefile;
|
|
||||||
|
|
||||||
/** \class cmInstallFilesGenerator
|
/** \class cmInstallFilesGenerator
|
||||||
* \brief Generate file installation rules.
|
* \brief Generate file installation rules.
|
||||||
*/
|
*/
|
||||||
class cmInstallFilesGenerator: public cmInstallGenerator
|
class cmInstallFilesGenerator: public cmInstallGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmInstallFilesGenerator(cmMakefile* mf,
|
cmInstallFilesGenerator(std::vector<std::string> const& files,
|
||||||
std::vector<std::string> const& files,
|
|
||||||
const char* dest, bool programs,
|
const char* dest, bool programs,
|
||||||
const char* file_permissions,
|
const char* file_permissions,
|
||||||
std::vector<std::string> const& configurations,
|
std::vector<std::string> const& configurations,
|
||||||
|
@ -33,6 +30,8 @@ public:
|
||||||
bool optional = false);
|
bool optional = false);
|
||||||
virtual ~cmInstallFilesGenerator();
|
virtual ~cmInstallFilesGenerator();
|
||||||
|
|
||||||
|
void Compute(cmLocalGenerator* lg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
|
virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
|
||||||
virtual void GenerateScriptForConfig(std::ostream& os,
|
virtual void GenerateScriptForConfig(std::ostream& os,
|
||||||
|
@ -41,7 +40,7 @@ protected:
|
||||||
void AddFilesInstallRule(std::ostream& os, Indent const& indent,
|
void AddFilesInstallRule(std::ostream& os, Indent const& indent,
|
||||||
std::vector<std::string> const& files);
|
std::vector<std::string> const& files);
|
||||||
|
|
||||||
cmMakefile* Makefile;
|
cmLocalGenerator* LocalGenerator;
|
||||||
std::vector<std::string> Files;
|
std::vector<std::string> Files;
|
||||||
std::string FilePermissions;
|
std::string FilePermissions;
|
||||||
std::string Rename;
|
std::string Rename;
|
||||||
|
|
|
@ -91,7 +91,7 @@ void cmInstallProgramsCommand::FinalPass()
|
||||||
cmInstallGenerator::MessageLevel message =
|
cmInstallGenerator::MessageLevel message =
|
||||||
cmInstallGenerator::SelectMessageLevel(this->Makefile);
|
cmInstallGenerator::SelectMessageLevel(this->Makefile);
|
||||||
this->Makefile->AddInstallGenerator(
|
this->Makefile->AddInstallGenerator(
|
||||||
new cmInstallFilesGenerator(this->Makefile, this->Files,
|
new cmInstallFilesGenerator(this->Files,
|
||||||
destination.c_str(), true,
|
destination.c_str(), true,
|
||||||
no_permissions, no_configurations,
|
no_permissions, no_configurations,
|
||||||
no_component.c_str(), message, no_rename));
|
no_component.c_str(), message, no_rename));
|
||||||
|
|
Loading…
Reference in New Issue