summaryrefslogtreecommitdiff
path: root/Source/cmCMakeMinimumRequired.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2008-03-07 11:43:47 -0500
committerKen Martin <ken.martin@kitware.com>2008-03-07 11:43:47 -0500
commit55eede4b131e39cc341832cd99d3b339f040af75 (patch)
tree7a36fdcf05163e4a35e2c0ecc3b91d017afe7236 /Source/cmCMakeMinimumRequired.cxx
parent497779d4b3be8ac387690bc95fdadab122fa5a3c (diff)
downloadcmake-55eede4b131e39cc341832cd99d3b339f040af75.tar.gz
ENH: clean up some policy stuff and interactions with CMAKE_BACKWARDS_COMPATIBILITY and CMAKE_MINIMUM_REQUIRED
Diffstat (limited to 'Source/cmCMakeMinimumRequired.cxx')
-rw-r--r--Source/cmCMakeMinimumRequired.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx
index 54acb898c1..bb5bdb0996 100644
--- a/Source/cmCMakeMinimumRequired.cxx
+++ b/Source/cmCMakeMinimumRequired.cxx
@@ -108,6 +108,15 @@ bool cmCMakeMinimumRequired
cmSystemTools::SetFatalErrorOccured();
}
+ if (required_major < 2 || required_major == 2 && required_minor < 4)
+ {
+ this->Makefile->SetPolicyVersion("2.4");
+ }
+ else
+ {
+ this->Makefile->SetPolicyVersion(version_string.c_str());
+ }
+
return true;
}