1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #include "cmContinueCommand.h"
5 #include "cmExecutionStatus.h"
6 #include "cmMakefile.h"
7 #include "cmMessageType.h"
8 #include "cmSystemTools.h"
11 bool cmContinueCommand(std::vector
<std::string
> const& args
,
12 cmExecutionStatus
& status
)
14 if (!status
.GetMakefile().IsLoopBlock()) {
15 status
.GetMakefile().IssueMessage(
16 MessageType::FATAL_ERROR
,
17 "A CONTINUE command was found outside of a "
18 "proper FOREACH or WHILE loop scope.");
19 cmSystemTools::SetFatalErrorOccurred();
23 status
.SetContinueInvoked();
26 status
.GetMakefile().IssueMessage(
27 MessageType::FATAL_ERROR
,
28 "The CONTINUE command does not accept any "
30 cmSystemTools::SetFatalErrorOccurred();