diff options
Diffstat (limited to 'Source/cmEndIfCommand.cxx')
-rw-r--r-- | Source/cmEndIfCommand.cxx | 7 |
1 files changed, 7 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; } |