| 714 | } |
| 715 | |
| 716 | std::unique_ptr<cmList::TransformSelector> cmList::TransformSelector::NewREGEX( |
| 717 | std::string const& regex) |
| 718 | { |
| 719 | std::unique_ptr<::TransformSelector> selector = |
| 720 | cm::make_unique<TransformSelectorRegex>(regex); |
| 721 | if (!selector->Validate()) { |
| 722 | throw transform_error( |
| 723 | cmStrCat("sub-command TRANSFORM, selector REGEX failed to compile " |
| 724 | "regex \"", |
| 725 | regex, "\".")); |
| 726 | } |
| 727 | // weird construct to please all compilers |
| 728 | return std::unique_ptr<cmList::TransformSelector>(selector.release()); |
| 729 | } |
| 730 | std::unique_ptr<cmList::TransformSelector> cmList::TransformSelector::NewREGEX( |
| 731 | std::string&& regex) |
| 732 | { |
nothing calls this directly
no test coverage detected