| 288 | } |
| 289 | |
| 290 | bool RegexQuote(std::vector<std::string> const& args, |
| 291 | cmExecutionStatus& status) |
| 292 | { |
| 293 | //"STRING(REGEX QUOTE <output variable> <input> [<input>...]\n" |
| 294 | std::string const& outvar = args[2]; |
| 295 | cm::CMakeString data{ cmMakeRange(args).advance(3) }; |
| 296 | |
| 297 | try { |
| 298 | // Escape all regex special characters |
| 299 | data.Quote(); |
| 300 | // Store the output in the provided variable. |
| 301 | status.GetMakefile().AddDefinition(outvar, data); |
| 302 | return true; |
| 303 | } catch (std::exception const& e) { |
| 304 | status.SetError( |
| 305 | cmStrCat("sub-command REGEX, mode QUOTE: ", e.what(), '.')); |
| 306 | return false; |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | bool HandleFindCommand(std::vector<std::string> const& args, |
| 311 | cmExecutionStatus& status) |
no test coverage detected
searching dependent graphs…