Coverage Report

Created: 2026-07-30 06:52

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmAddDefinitionsCommand.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 "cmAddDefinitionsCommand.h"
4
5
#include "cmDiagnostics.h"
6
#include "cmExecutionStatus.h"
7
#include "cmMakefile.h"
8
9
bool cmAddDefinitionsCommand(std::vector<std::string> const& args,
10
                             cmExecutionStatus& status)
11
0
{
12
0
  cmMakefile& mf = status.GetMakefile();
13
14
0
  mf.IssueDiagnostic(
15
0
    cmDiagnostics::CMD_NON_TARGET_DIRECTIVE,
16
0
    "Use of non-target directives is not recommended. "
17
0
    "Consider target_compile_definitions, target_compile_options, or "
18
0
    "target_include_directories instead.");
19
20
0
  for (std::string const& i : args) {
21
0
    mf.AddDefineFlag(i);
22
0
  }
23
24
0
  return true;
25
0
}