2014-11-29 19:56:18 +03:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2014 Kitware, Inc., Insight Software Consortium
|
|
|
|
|
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
|
|
|
#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;
|
|
|
|
}
|