MCPcopy Create free account
hub / github.com/Kitware/CMake / AddUnexpectedCommand

Method AddUnexpectedCommand

Source/cmState.cxx:487–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487void 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
504void cmState::AddUnexpectedFlowControlCommand(std::string const& name,
505 char const* error)

Callers 1

Calls 5

AddBuiltinCommandMethod · 0.95
c_strMethod · 0.80
GetDefinitionMethod · 0.45
GetMakefileMethod · 0.45
SetErrorMethod · 0.45

Tested by

no test coverage detected