| 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 Version |
| 41 | { |
| 42 | int Major = 0; |
| 43 | int Minor = 0; |
| 44 | }; |
| 45 | |
| 46 | struct Callback |
| 47 | { |
| 48 | std::string Command; |
| 49 | Version DataVersion; |
| 50 | }; |
| 51 | |
| 52 | struct QueryJSONRoot |
| 53 | { |
| 54 | std::vector<cmInstrumentationQuery::Option> options; |
| 55 | std::vector<cmInstrumentationQuery::Hook> hooks; |
| 56 | std::vector<std::string> callbacks; |
| 57 | Version version; |
| 58 | }; |
| 59 | |
| 60 | cmInstrumentationQuery() = default; |
| 61 | bool ReadJSON(std::string const& file, std::string& errorMessage, |
| 62 | std::set<Option>& options, std::set<Hook>& hooks, |
| 63 | std::vector<Callback>& callbacks); |
| 64 | QueryJSONRoot queryRoot; |
| 65 | cmJSONState parseState; |
| 66 | static Version LatestDataVersion(); |
| 67 | static bool ValidDataVersion(Version version); |
| 68 | }; |
no outgoing calls
no test coverage detected
searching dependent graphs…