cmInstallGenerator: Add a Compute() virtual hook.

This commit is contained in:
Stephen Kelly 2015-07-28 19:49:16 +02:00
parent 3ef8aaaa71
commit e5e5297018
2 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,7 @@
#include "cmExportBuildFileGenerator.h" #include "cmExportBuildFileGenerator.h"
#include "cmCPackPropertiesGenerator.h" #include "cmCPackPropertiesGenerator.h"
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmInstallGenerator.h"
#include <cmsys/Directory.hxx> #include <cmsys/Directory.hxx>
#include <cmsys/FStream.hxx> #include <cmsys/FStream.hxx>
@ -1260,6 +1261,17 @@ bool cmGlobalGenerator::Compute()
} }
#endif #endif
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
std::vector<cmInstallGenerator*>& gens = mf->GetInstallGenerators();
for (std::vector<cmInstallGenerator*>::const_iterator git = gens.begin();
git != gens.end(); ++git)
{
(*git)->Compute(this->LocalGenerators[i]);
}
}
return true; return true;
} }

View File

@ -62,6 +62,8 @@ public:
/** Select message level from CMAKE_INSTALL_MESSAGE or 'never'. */ /** Select message level from CMAKE_INSTALL_MESSAGE or 'never'. */
static MessageLevel SelectMessageLevel(cmMakefile* mf, bool never = false); static MessageLevel SelectMessageLevel(cmMakefile* mf, bool never = false);
virtual void Compute(cmLocalGenerator*) {}
protected: protected:
virtual void GenerateScript(std::ostream& os); virtual void GenerateScript(std::ostream& os);