CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / cmContinueCommand.cxx
blobc6cecbe3ced0bb47f7e45c3939b9ecb5475e703e
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"
10 // cmContinueCommand
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();
20 return true;
23 status.SetContinueInvoked();
25 if (!args.empty()) {
26 status.GetMakefile().IssueMessage(
27 MessageType::FATAL_ERROR,
28 "The CONTINUE command does not accept any "
29 "arguments.");
30 cmSystemTools::SetFatalErrorOccurred();
31 return true;
34 return true;