| 167 | } |
| 168 | |
| 169 | static std::string getCppFiles(std::vector<std::string> &files, const std::string &path, bool recursive) |
| 170 | { |
| 171 | std::list<FileWithDetails> filelist; |
| 172 | const std::set<std::string> extra; |
| 173 | const std::vector<std::string> masks; |
| 174 | const PathMatch matcher(masks, Path::getCurrentPath()); |
| 175 | std::string err = FileLister::addFiles(filelist, path, extra, recursive, matcher); |
| 176 | if (!err.empty()) |
| 177 | return err; |
| 178 | |
| 179 | // add *.cpp files to the "files" vector.. |
| 180 | for (const auto& file : filelist) { |
| 181 | if (endsWith(file.path(), ".cpp")) |
| 182 | files.push_back(file.path()); |
| 183 | } |
| 184 | return ""; |
| 185 | } |
| 186 | |
| 187 | |
| 188 | static void makeConditionalVariable(std::ostream &os, const std::string &variable, const std::string &defaultValue) |