Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmContinueCommand.cxx
Line
Count
Source
1
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2
   file LICENSE.rst or https://cmake.org/licensing for details.  */
3
#include "cmContinueCommand.h"
4
5
#include "cmExecutionStatus.h"
6
#include "cmMakefile.h"
7
#include "cmMessageType.h"
8
#include "cmSystemTools.h"
9
10
// cmContinueCommand
11
bool cmContinueCommand(std::vector<std::string> const& args,
12
                       cmExecutionStatus& status)
13
0
{
14
0
  if (!status.GetMakefile().IsLoopBlock()) {
15
0
    status.GetMakefile().IssueMessage(
16
0
      MessageType::FATAL_ERROR,
17
0
      "A CONTINUE command was found outside of a "
18
0
      "proper FOREACH or WHILE loop scope.");
19
0
    cmSystemTools::SetFatalErrorOccurred();
20
0
    return true;
21
0
  }
22
23
0
  status.SetContinueInvoked();
24
25
0
  if (!args.empty()) {
26
0
    status.GetMakefile().IssueMessage(
27
0
      MessageType::FATAL_ERROR,
28
0
      "The CONTINUE command does not accept any "
29
0
      "arguments.");
30
0
    cmSystemTools::SetFatalErrorOccurred();
31
0
    return true;
32
0
  }
33
34
0
  return true;
35
0
}