| 66 | #endif |
| 67 | |
| 68 | static bool addFilesToList(const std::string& fileList, std::vector<std::string>& pathNames) |
| 69 | { |
| 70 | std::istream *files; |
| 71 | std::ifstream infile; |
| 72 | if (fileList == "-") { // read from stdin |
| 73 | files = &std::cin; |
| 74 | } else { |
| 75 | infile.open(fileList); |
| 76 | if (!infile.is_open()) |
| 77 | return false; |
| 78 | files = &infile; |
| 79 | } |
| 80 | std::string fileName; |
| 81 | while (std::getline(*files, fileName)) { // next line |
| 82 | if (!fileName.empty()) { |
| 83 | pathNames.emplace_back(std::move(fileName)); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | return true; |
| 88 | } |
| 89 | |
| 90 | static bool addIncludePathsToList(const std::string& fileList, std::list<std::string>& pathNames) |
| 91 | { |
no test coverage detected