summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-09-24 18:49:34 (GMT)
committerBrad King <brad.king@kitware.com>2002-09-24 18:49:34 (GMT)
commit94ff97ceed358ca8bf71d1c9a647f6cc10f90142 (patch)
treed70f249bd7625427b687b52de68c746a9885c5b3
parentdb2bd57179ed311c5c7c1654dcb3ff0f27158819 (diff)
downloadCMake-94ff97ceed358ca8bf71d1c9a647f6cc10f90142.zip
CMake-94ff97ceed358ca8bf71d1c9a647f6cc10f90142.tar.gz
CMake-94ff97ceed358ca8bf71d1c9a647f6cc10f90142.tar.bz2
*** empty log message ***
-rw-r--r--Source/cmEndIfCommand.cxx7
-rw-r--r--Source/cmIfCommand.cxx7
2 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx
index 7dd1db0..fb408a1 100644
--- a/Source/cmEndIfCommand.cxx
+++ b/Source/cmEndIfCommand.cxx
@@ -19,6 +19,13 @@
bool cmEndIfCommand::InitialPass(std::vector<std::string> const&)
{
+ const char* versionValue
+ = m_Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ if (!versionValue || (atof(versionValue) <= 1.4))
+ {
+ return true;
+ }
+
this->SetError("An ENDIF command was found outside of a proper IF ENDIF structure. Or its arguments did not match the opening IF command.");
return false;
}
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 4fb9bfd..de5a09b 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -81,6 +81,13 @@ ShouldRemove(const char *name, const std::vector<std::string> &args,
void cmIfFunctionBlocker::
ScopeEnded(cmMakefile &mf)
{
+ const char* versionValue
+ = mf.GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ if (!versionValue || (atof(versionValue) <= 1.4))
+ {
+ return;
+ }
+
std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: ";
errmsg += mf.GetCurrentDirectory();
errmsg += "\nThe arguments are: ";