| 810 | |
| 811 | template <typename IndexType> |
| 812 | bool GetNumericArguments( |
| 813 | cm::GenEx::Evaluation* eval, GeneratorExpressionContent const* cnt, |
| 814 | Arguments args, std::vector<IndexType>& indexes, |
| 815 | cmList::ExpandElements expandElements = cmList::ExpandElements::No) |
| 816 | { |
| 817 | using IndexRange = cmRange<Arguments::const_iterator>; |
| 818 | IndexRange arguments(args.begin(), args.end()); |
| 819 | cmList list; |
| 820 | if (expandElements == cmList::ExpandElements::Yes) { |
| 821 | list = cmList{ args.begin(), args.end(), expandElements }; |
| 822 | arguments = IndexRange{ list.begin(), list.end() }; |
| 823 | } |
| 824 | |
| 825 | for (auto const& value : arguments) { |
| 826 | IndexType index; |
| 827 | if (!GetNumericArgument(value, index)) { |
| 828 | reportError(eval, cnt->GetOriginalExpression(), |
| 829 | cmStrCat("index: \"", value, "\" is not a valid index")); |
| 830 | return false; |
| 831 | } |
| 832 | indexes.push_back(index); |
| 833 | } |
| 834 | return true; |
| 835 | } |
| 836 | |
| 837 | bool CheckPathParametersEx(cm::GenEx::Evaluation* eval, |
| 838 | GeneratorExpressionContent const* cnt, |
no test coverage detected
searching dependent graphs…