diff options
-rw-r--r-- | Source/cmInstallCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmInstallFilesCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmInstallFilesGenerator.cxx | 15 | ||||
-rw-r--r-- | Source/cmInstallFilesGenerator.h | 9 | ||||
-rw-r--r-- | Source/cmInstallProgramsCommand.cxx | 2 |
5 files changed, 17 insertions, 13 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f548f5d..e22dc42 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -42,7 +42,7 @@ static cmInstallFilesGenerator* CreateInstallFilesGenerator( { cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(mf); - return new cmInstallFilesGenerator(mf, + return new cmInstallFilesGenerator( absFiles, args.GetDestination().c_str(), programs, args.GetPermissions().c_str(), args.GetConfigurations(), args.GetComponent().c_str(), diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx index 508c373..68557bd 100644 --- a/Source/cmInstallFilesCommand.cxx +++ b/Source/cmInstallFilesCommand.cxx @@ -128,7 +128,7 @@ void cmInstallFilesCommand::CreateInstallGenerator() const cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(this->Makefile); this->Makefile->AddInstallGenerator( - new cmInstallFilesGenerator(this->Makefile, this->Files, + new cmInstallFilesGenerator(this->Files, destination.c_str(), false, no_permissions, no_configurations, no_component.c_str(), message, no_rename)); diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx index ff2c6e5..c18b174 100644 --- a/Source/cmInstallFilesGenerator.cxx +++ b/Source/cmInstallFilesGenerator.cxx @@ -14,11 +14,11 @@ #include "cmGeneratorExpression.h" #include "cmMakefile.h" #include "cmSystemTools.h" +#include "cmLocalGenerator.h" //---------------------------------------------------------------------------- cmInstallFilesGenerator -::cmInstallFilesGenerator(cmMakefile* mf, - std::vector<std::string> const& files, +::cmInstallFilesGenerator(std::vector<std::string> const& files, const char* dest, bool programs, const char* file_permissions, std::vector<std::string> const& configurations, @@ -27,7 +27,7 @@ cmInstallFilesGenerator const char* rename, bool optional): cmInstallGenerator(dest, configurations, component, message), - Makefile(mf), + LocalGenerator(0), Files(files), FilePermissions(file_permissions), Rename(rename), @@ -51,6 +51,11 @@ cmInstallFilesGenerator { } +void cmInstallFilesGenerator::Compute(cmLocalGenerator* lg) +{ + this->LocalGenerator = lg; +} + //---------------------------------------------------------------------------- void cmInstallFilesGenerator::AddFilesInstallRule( std::ostream& os, Indent const& indent, @@ -94,8 +99,8 @@ void cmInstallFilesGenerator::GenerateScriptForConfig(std::ostream& os, i != this->Files.end(); ++i) { cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*i); - cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, config), - files); + cmSystemTools::ExpandListArgument(cge->Evaluate( + this->LocalGenerator->GetMakefile(), config), files); } this->AddFilesInstallRule(os, indent, files); } diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h index bf482d6..00b3a79 100644 --- a/Source/cmInstallFilesGenerator.h +++ b/Source/cmInstallFilesGenerator.h @@ -14,16 +14,13 @@ #include "cmInstallGenerator.h" -class cmMakefile; - /** \class cmInstallFilesGenerator * \brief Generate file installation rules. */ class cmInstallFilesGenerator: public cmInstallGenerator { public: - cmInstallFilesGenerator(cmMakefile* mf, - std::vector<std::string> const& files, + cmInstallFilesGenerator(std::vector<std::string> const& files, const char* dest, bool programs, const char* file_permissions, std::vector<std::string> const& configurations, @@ -33,6 +30,8 @@ public: bool optional = false); virtual ~cmInstallFilesGenerator(); + void Compute(cmLocalGenerator* lg); + protected: virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); virtual void GenerateScriptForConfig(std::ostream& os, @@ -41,7 +40,7 @@ protected: void AddFilesInstallRule(std::ostream& os, Indent const& indent, std::vector<std::string> const& files); - cmMakefile* Makefile; + cmLocalGenerator* LocalGenerator; std::vector<std::string> Files; std::string FilePermissions; std::string Rename; diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index be8096c..e6fbe88 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -91,7 +91,7 @@ void cmInstallProgramsCommand::FinalPass() cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(this->Makefile); this->Makefile->AddInstallGenerator( - new cmInstallFilesGenerator(this->Makefile, this->Files, + new cmInstallFilesGenerator(this->Files, destination.c_str(), true, no_permissions, no_configurations, no_component.c_str(), message, no_rename)); |