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

Method Evaluate

Source/cmGeneratorExpressionNode.cxx:201–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 NotNode() {} // NOLINT(modernize-use-equals-default)
200
201 std::string Evaluate(
202 std::vector<std::string> const& parameters, cm::GenEx::Evaluation* eval,
203 GeneratorExpressionContent const* content,
204 cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override
205 {
206 if (parameters.front() != "0" && parameters.front() != "1") {
207 reportError(
208 eval, content->GetOriginalExpression(),
209 "$<NOT> parameter must resolve to exactly one '0' or '1' value.");
210 return std::string();
211 }
212 return parameters.front() == "0" ? "1" : "0";
213 }
214} notNode;
215
216static const struct BoolNode : public cmGeneratorExpressionNode

Callers

nothing calls this directly

Calls 3

reportErrorFunction · 0.85
GetOriginalExpressionMethod · 0.80
frontMethod · 0.45

Tested by

no test coverage detected