| 485 | } |
| 486 | |
| 487 | void cmState::AddUnexpectedCommand(std::string const& name, char const* error) |
| 488 | { |
| 489 | this->AddBuiltinCommand( |
| 490 | name, |
| 491 | [name, error](std::vector<cmListFileArgument> const&, |
| 492 | cmExecutionStatus& status) -> bool { |
| 493 | cmValue versionValue = |
| 494 | status.GetMakefile().GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION"); |
| 495 | if (name == "endif" && |
| 496 | (!versionValue || atof(versionValue->c_str()) <= 1.4)) { |
| 497 | return true; |
| 498 | } |
| 499 | status.SetError(error); |
| 500 | return false; |
| 501 | }); |
| 502 | } |
| 503 | |
| 504 | void cmState::AddUnexpectedFlowControlCommand(std::string const& name, |
| 505 | char const* error) |
no test coverage detected