MCPcopy Create free account
hub / github.com/Kitware/CMake / WriteJSONQuery

Method WriteJSONQuery

Source/cmInstrumentation.cxx:205–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void 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
229void cmInstrumentation::AddCustomContent(std::string const& name,
230 Json::Value const& contents)

Callers 2

CheckCDashVariableMethod · 0.95
cmInstrumentationCommandFunction · 0.80

Calls 3

appendMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected