diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-25 15:55:34 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-27 18:09:38 (GMT) |
commit | a8e5d838edcb692ff69c2073cf692d7067f52c67 (patch) | |
tree | f86d9ecc86ab84e990eefc8efeccbc1d5ae1a949 | |
parent | d568eefe104e480706a2e6ceb16df4376d4becbf (diff) | |
download | CMake-a8e5d838edcb692ff69c2073cf692d7067f52c67.zip CMake-a8e5d838edcb692ff69c2073cf692d7067f52c67.tar.gz CMake-a8e5d838edcb692ff69c2073cf692d7067f52c67.tar.bz2 |
cmCPackPropertiesGenerator: Require cmLocalGenerator in API.
-rw-r--r-- | Source/cmCPackPropertiesGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmCPackPropertiesGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/Source/cmCPackPropertiesGenerator.cxx b/Source/cmCPackPropertiesGenerator.cxx index 368a0e6..cbcdd81 100644 --- a/Source/cmCPackPropertiesGenerator.cxx +++ b/Source/cmCPackPropertiesGenerator.cxx @@ -1,13 +1,14 @@ #include "cmCPackPropertiesGenerator.h" #include "cmOutputConverter.h" +#include "cmLocalGenerator.h" cmCPackPropertiesGenerator::cmCPackPropertiesGenerator( - cmMakefile* mf, + cmLocalGenerator* lg, cmInstalledFile const& installedFile, std::vector<std::string> const& configurations): cmScriptGenerator("CPACK_BUILD_CONFIG", configurations), - Makefile(mf), + LG(lg), InstalledFile(installedFile) { this->ActionsPerConfig = true; @@ -17,7 +18,8 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os, const std::string& config, Indent const& indent) { std::string const& expandedFileName = - this->InstalledFile.GetNameExpression().Evaluate(this->Makefile, config); + this->InstalledFile.GetNameExpression().Evaluate(this->LG->GetMakefile(), + config); cmInstalledFile::PropertyMapType const& properties = this->InstalledFile.GetProperties(); @@ -36,7 +38,7 @@ void cmCPackPropertiesGenerator::GenerateScriptForConfig(std::ostream& os, j = property.ValueExpressions.begin(); j != property.ValueExpressions.end(); ++j) { - std::string value = (*j)->Evaluate(this->Makefile, config); + std::string value = (*j)->Evaluate(LG->GetMakefile(), config); os << " " << cmOutputConverter::EscapeForCMake(value); } diff --git a/Source/cmCPackPropertiesGenerator.h b/Source/cmCPackPropertiesGenerator.h index 71e2eaa..eec3df0 100644 --- a/Source/cmCPackPropertiesGenerator.h +++ b/Source/cmCPackPropertiesGenerator.h @@ -15,6 +15,8 @@ #include "cmScriptGenerator.h" #include "cmInstalledFile.h" +class cmLocalGenerator; + /** \class cmCPackPropertiesGenerator * \brief Support class for generating CPackProperties.cmake. * @@ -23,7 +25,7 @@ class cmCPackPropertiesGenerator: public cmScriptGenerator { public: cmCPackPropertiesGenerator( - cmMakefile* mf, + cmLocalGenerator* lg, cmInstalledFile const& installedFile, std::vector<std::string> const& configurations); @@ -31,7 +33,7 @@ protected: virtual void GenerateScriptForConfig(std::ostream& os, const std::string& config, Indent const& indent); - cmMakefile* Makefile; + cmLocalGenerator* LG; cmInstalledFile const& InstalledFile; }; diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 88ac0bc..fcb5998 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -3050,7 +3050,8 @@ bool cmGlobalGenerator::GenerateCPackPropertiesFile() cmake::InstalledFilesMap const& installedFiles = this->CMakeInstance->GetInstalledFiles(); - cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); + cmLocalGenerator* lg = this->LocalGenerators[0]; + cmMakefile* mf = lg->GetMakefile(); std::vector<std::string> configs; std::string config = mf->GetConfigurations(configs, false); @@ -3072,7 +3073,7 @@ bool cmGlobalGenerator::GenerateCPackPropertiesFile() cmInstalledFile const& installedFile = i->second; cmCPackPropertiesGenerator cpackPropertiesGenerator( - mf, installedFile, configs); + lg, installedFile, configs); cpackPropertiesGenerator.Generate(file, config, configs); } |