| 196 | } |
| 197 | |
| 198 | bool cmCMakeLanguageCommandEVAL(std::vector<cmListFileArgument> const& args, |
| 199 | cmExecutionStatus& status) |
| 200 | { |
| 201 | cmMakefile& makefile = status.GetMakefile(); |
| 202 | cmListFileContext context = makefile.GetBacktrace().Top(); |
| 203 | std::vector<std::string> expandedArgs; |
| 204 | makefile.ExpandArguments(args, expandedArgs); |
| 205 | |
| 206 | if (expandedArgs.size() < 2) { |
| 207 | return FatalError(status, "called with incorrect number of arguments"); |
| 208 | } |
| 209 | |
| 210 | if (expandedArgs[1] != "CODE") { |
| 211 | auto code_iter = |
| 212 | std::find(expandedArgs.begin() + 2, expandedArgs.end(), "CODE"); |
| 213 | if (code_iter == expandedArgs.end()) { |
| 214 | return FatalError(status, "called without CODE argument"); |
| 215 | } |
| 216 | return FatalError( |
| 217 | status, |
| 218 | "called with unsupported arguments between EVAL and CODE arguments"); |
| 219 | } |
| 220 | |
| 221 | std::string const code = |
| 222 | cmJoin(cmMakeRange(expandedArgs.begin() + 2, expandedArgs.end()), " "); |
| 223 | return makefile.ReadListFileAsString( |
| 224 | code, cmStrCat(context.FilePath, ':', context.Line, ":EVAL")); |
| 225 | } |
| 226 | |
| 227 | bool cmCMakeLanguageCommandSET_DEPENDENCY_PROVIDER( |
| 228 | std::vector<std::string> const& args, cmExecutionStatus& status) |
no test coverage detected
searching dependent graphs…