MCPcopy Create free account
hub / github.com/Kitware/CMake / GetNumericArguments

Function GetNumericArguments

Source/cmGeneratorExpressionNode.cxx:812–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810
811template <typename IndexType>
812bool 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
837bool CheckPathParametersEx(cm::GenEx::Evaluation* eval,
838 GeneratorExpressionContent const* cnt,

Callers 2

EvaluateMethod · 0.85
EvaluateMethod · 0.85

Calls 7

GetNumericArgumentFunction · 0.85
reportErrorFunction · 0.85
GetOriginalExpressionMethod · 0.80
push_backMethod · 0.80
cmStrCatFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…