ENH: Add cmMakefile::NeedBackwardsCompatibility method to pass through to cmLocalGenerator::NeedBackwardsCompatibility for convenience.

This commit is contained in:
Brad King 2008-02-11 13:35:30 -05:00
parent 968c53ff6f
commit 739a463539
2 changed files with 22 additions and 0 deletions

View File

@ -527,6 +527,21 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg)
this->LocalGenerator = lg; this->LocalGenerator = lg;
} }
bool cmMakefile::NeedBackwardsCompatibility(unsigned int major,
unsigned int minor,
unsigned int patch)
{
if(this->LocalGenerator)
{
return
this->LocalGenerator->NeedBackwardsCompatibility(major, minor, patch);
}
else
{
return false;
}
}
void cmMakefile::FinalPass() void cmMakefile::FinalPass()
{ {
// do all the variable expansions here // do all the variable expansions here

View File

@ -122,6 +122,13 @@ public:
cmLocalGenerator* GetLocalGenerator() cmLocalGenerator* GetLocalGenerator()
{ return this->LocalGenerator;} { return this->LocalGenerator;}
/**
* Test whether compatibility is set to a given version or lower.
*/
bool NeedBackwardsCompatibility(unsigned int major,
unsigned int minor,
unsigned int patch = 0xFFu);
/** /**
* Perform FinalPass, Library dependency analysis etc before output of the * Perform FinalPass, Library dependency analysis etc before output of the
* makefile. * makefile.