| 69 | } |
| 70 | |
| 71 | void 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 | |
| 103 | std::vector<unsigned int> cmFileAPI::GetConfigureLogVersions() |
| 104 | { |
no test coverage detected