2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2014-11-29 19:56:18 +03:00
|
|
|
#include "cmContinueCommand.h"
|
|
|
|
|
|
|
|
// cmContinueCommand
|
2016-05-16 17:34:04 +03:00
|
|
|
bool cmContinueCommand::InitialPass(std::vector<std::string> const& args,
|
|
|
|
cmExecutionStatus& status)
|
2014-11-29 19:56:18 +03:00
|
|
|
{
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!this->Makefile->IsLoopBlock()) {
|
2014-11-29 19:56:18 +03:00
|
|
|
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
|
|
|
"A CONTINUE command was found outside of a "
|
|
|
|
"proper FOREACH or WHILE loop scope.");
|
|
|
|
cmSystemTools::SetFatalErrorOccured();
|
|
|
|
return true;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2014-11-29 19:56:18 +03:00
|
|
|
|
|
|
|
status.SetContinueInvoked(true);
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
if (!args.empty()) {
|
2014-11-29 19:56:18 +03:00
|
|
|
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
|
|
|
|
"The CONTINUE command does not accept any "
|
|
|
|
"arguments.");
|
|
|
|
cmSystemTools::SetFatalErrorOccured();
|
|
|
|
return true;
|
2016-05-16 17:34:04 +03:00
|
|
|
}
|
2014-11-29 19:56:18 +03:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|