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

Method Evaluate

Source/cmGeneratorExpressionNode.cxx:172–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 }
171
172 std::string Evaluate(std::vector<std::string> const& parameters,
173 cm::GenEx::Evaluation* eval,
174 GeneratorExpressionContent const* content,
175 cmGeneratorExpressionDAGChecker*) const override
176 {
177 for (std::string const& param : parameters) {
178 if (param == this->failureVal) {
179 return this->failureVal;
180 }
181 if (param != this->successVal) {
182 std::ostringstream e;
183 e << "Parameters to $<" << this->op;
184 e << "> must resolve to either '0' or '1'.";
185 reportError(eval, content->GetOriginalExpression(), e.str());
186 return std::string();
187 }
188 }
189 return this->successVal;
190 }
191
192 char const *const op, *const successVal, *const failureVal;
193};

Callers

nothing calls this directly

Calls 3

reportErrorFunction · 0.85
GetOriginalExpressionMethod · 0.80
strMethod · 0.80

Tested by

no test coverage detected