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

Method Evaluate

Source/cmGeneratorExpressionNode.cxx:3624–3643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3622 int NumExpectedParameters() const override { return 2; }
3623
3624 std::string Evaluate(
3625 std::vector<std::string> const& parameters, cm::GenEx::Evaluation* eval,
3626 GeneratorExpressionContent const* content,
3627 cmGeneratorExpressionDAGChecker* /*dagCheckerParent*/) const override
3628 {
3629 if (parameters[0].empty()) {
3630 reportError(
3631 eval, content->GetOriginalExpression(),
3632 "$<FILE_SET_EXISTS:fileset,TARGET:tgt> expression requires a "
3633 "non-empty FILE_SET name.");
3634 return std::string{};
3635 }
3636
3637 cmFileSet* fileSet = nullptr;
3638 if (!GetFileSet(parameters, eval, content, fileSet)) {
3639 return std::string{};
3640 }
3641
3642 return fileSet ? "1" : "0";
3643 }
3644} fileSetExistsNode;
3645
3646static const struct FileSetPropertyNode : public cmGeneratorExpressionNode

Callers

nothing calls this directly

Calls 4

reportErrorFunction · 0.85
GetFileSetFunction · 0.85
GetOriginalExpressionMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected