Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmInstrumentationQuery.h
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
#pragma once
4
5
#include <set>
6
#include <string>
7
#include <vector>
8
9
#include "cmJSONState.h"
10
11
class cmInstrumentationQuery
12
{
13
14
public:
15
  enum Option
16
  {
17
    StaticSystemInformation,
18
    DynamicSystemInformation,
19
    CDashSubmit,
20
    CDashVerbose,
21
    Trace
22
  };
23
  static std::vector<std::string> const OptionString;
24
25
  enum Hook
26
  {
27
    PostGenerate,
28
    PreBuild,
29
    PostBuild,
30
    PreCMakeBuild,
31
    PostCMakeBuild,
32
    PostCTest,
33
    PostCMakeInstall,
34
    PostCMakeWorkflow,
35
    PrepareForCDash,
36
    Manual
37
  };
38
  static std::vector<std::string> const HookString;
39
40
  struct QueryJSONRoot
41
  {
42
    std::vector<cmInstrumentationQuery::Option> options;
43
    std::vector<cmInstrumentationQuery::Hook> hooks;
44
    std::vector<std::string> callbacks;
45
    int version;
46
  };
47
48
0
  cmInstrumentationQuery() = default;
49
  bool ReadJSON(std::string const& file, std::string& errorMessage,
50
                std::set<Option>& options, std::set<Hook>& hooks,
51
                std::vector<std::string>& callbacks);
52
  QueryJSONRoot queryRoot;
53
  cmJSONState parseState;
54
};