cmake/Source/cmContinueCommand.cxx

38 lines
1.4 KiB
C++
Raw Normal View History

2015-04-27 22:25:09 +02: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-07-09 11:21:54 +02:00
bool cmContinueCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status)
2015-04-27 22:25:09 +02:00
{
2016-07-09 11:21:54 +02:00
if (!this->Makefile->IsLoopBlock()) {
2015-04-27 22:25:09 +02: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-07-09 11:21:54 +02:00
}
2015-04-27 22:25:09 +02:00
status.SetContinueInvoked(true);
2016-07-09 11:21:54 +02:00
if (!args.empty()) {
2015-04-27 22:25:09 +02:00
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
"The CONTINUE command does not accept any "
"arguments.");
cmSystemTools::SetFatalErrorOccured();
return true;
2016-07-09 11:21:54 +02:00
}
2015-04-27 22:25:09 +02:00
return true;
}