| 339 | } |
| 340 | |
| 341 | void cmFindLibraryHelper::RegexFromLiteral(std::string& out, |
| 342 | std::string const& in, |
| 343 | cmSystemTools::DirCase dirCase) |
| 344 | { |
| 345 | for (char ch : in) { |
| 346 | if (ch == '[' || ch == ']' || ch == '(' || ch == ')' || ch == '\\' || |
| 347 | ch == '.' || ch == '*' || ch == '+' || ch == '?' || ch == '-' || |
| 348 | ch == '^' || ch == '$') { |
| 349 | out += "\\"; |
| 350 | } |
| 351 | if (dirCase == cmSystemTools::DirCase::Insensitive) { |
| 352 | out += static_cast<char>(cmsysString_tolower(ch)); |
| 353 | } else { |
| 354 | out += ch; |
| 355 | } |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | void cmFindLibraryHelper::RegexFromList(std::string& out, cmList const& in, |
| 360 | cmSystemTools::DirCase dirCase) |
no outgoing calls
no test coverage detected