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

Method ReadQueries

Source/cmFileAPI.cxx:71–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void cmFileAPI::ReadQueries()
72{
73 std::string const query_dir = cmStrCat(this->APIv1, "/query");
74 std::string const user_query_dir = cmStrCat(this->UserAPIv1, "/query");
75 this->QueryExists =
76 this->QueryExists || cmSystemTools::FileIsDirectory(query_dir);
77 if (!this->UserAPIv1.empty()) {
78 this->QueryExists =
79 this->QueryExists || cmSystemTools::FileIsDirectory(user_query_dir);
80 }
81 if (!this->QueryExists) {
82 return;
83 }
84
85 // Load queries at the top level.
86 std::vector<std::string> queries = cmFileAPI::LoadDir(query_dir);
87 if (!this->UserAPIv1.empty()) {
88 std::vector<std::string> user_queries = cmFileAPI::LoadDir(user_query_dir);
89 std::move(user_queries.begin(), user_queries.end(),
90 std::back_inserter(queries));
91 }
92
93 // Read the queries and save for later.
94 for (std::string& query : queries) {
95 if (cmHasLiteralPrefix(query, "client-")) {
96 this->ReadClient(query);
97 } else if (!cmFileAPI::ReadQuery(query, this->TopQuery.Known)) {
98 this->TopQuery.Unknown.push_back(std::move(query));
99 }
100 }
101}
102
103std::vector<unsigned int> cmFileAPI::GetConfigureLogVersions()
104{

Callers 1

ActualConfigureMethod · 0.80

Calls 8

ReadClientMethod · 0.95
moveFunction · 0.85
cmHasLiteralPrefixFunction · 0.85
push_backMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected