Coverage Report

Created: 2026-07-30 06:52

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