| 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 | }; |
nothing calls this directly
no test coverage detected