| 203 | } |
| 204 | |
| 205 | void cmInstrumentation::WriteJSONQuery( |
| 206 | cmInstrumentationQuery::Version dataVersion, |
| 207 | std::set<cmInstrumentationQuery::Option> const& options_, |
| 208 | std::set<cmInstrumentationQuery::Hook> const& hooks_, |
| 209 | std::vector<std::vector<std::string>> const& callbacks_) |
| 210 | { |
| 211 | Json::Value root; |
| 212 | root["options"] = Json::arrayValue; |
| 213 | for (auto const& option : options_) { |
| 214 | root["options"].append(cmInstrumentationQuery::OptionString[option]); |
| 215 | } |
| 216 | root["hooks"] = Json::arrayValue; |
| 217 | for (auto const& hook : hooks_) { |
| 218 | root["hooks"].append(cmInstrumentationQuery::HookString[hook]); |
| 219 | } |
| 220 | root["callbacks"] = Json::arrayValue; |
| 221 | for (auto const& callback : callbacks_) { |
| 222 | root["callbacks"].append(cmInstrumentation::GetCommandStr(callback)); |
| 223 | } |
| 224 | this->WriteInstrumentationJson( |
| 225 | dataVersion, root, "query/generated", |
| 226 | cmStrCat("query-", this->writtenJsonQueries++, ".json")); |
| 227 | } |
| 228 | |
| 229 | void cmInstrumentation::AddCustomContent(std::string const& name, |
| 230 | Json::Value const& contents) |
no test coverage detected