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

Method cmFileAPI

Source/cmFileAPI.cxx:46–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#endif
45
46cmFileAPI::cmFileAPI(cmake* cm)
47 : CMakeInstance(cm)
48{
49 this->APIv1 =
50 cmStrCat(this->CMakeInstance->GetHomeOutputDirectory(), "/.cmake/api/v1");
51
52 if (cm::optional<std::string> cmakeConfigDir =
53 cmSystemTools::GetCMakeConfigDirectory()) {
54 this->UserAPIv1 = cmStrCat(std::move(*cmakeConfigDir), "/api/v1"_s);
55 }
56
57 Json::CharReaderBuilder rbuilder;
58 rbuilder["collectComments"] = false;
59 rbuilder["failIfExtra"] = true;
60 rbuilder["rejectDupKeys"] = false;
61 rbuilder["strictRoot"] = true;
62 this->JsonReader =
63 std::unique_ptr<Json::CharReader>(rbuilder.newCharReader());
64
65 Json::StreamWriterBuilder wbuilder;
66 wbuilder["indentation"] = "\t";
67 this->JsonWriter =
68 std::unique_ptr<Json::StreamWriter>(wbuilder.newStreamWriter());
69}
70
71void cmFileAPI::ReadQueries()
72{

Callers

nothing calls this directly

Calls 4

moveFunction · 0.85
newCharReaderMethod · 0.80
newStreamWriterMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected