| 247 | } |
| 248 | |
| 249 | bool HandleAppendCommand(std::vector<std::string> const& args, |
| 250 | cmExecutionStatus& status) |
| 251 | { |
| 252 | if (args[1].empty()) { |
| 253 | status.SetError("Invalid name for path variable."); |
| 254 | return false; |
| 255 | } |
| 256 | |
| 257 | static OutputVariableParser const parser{}; |
| 258 | |
| 259 | auto const arguments = parser.Parse(args); |
| 260 | |
| 261 | if (arguments.MaybeReportError(status.GetMakefile())) { |
| 262 | return true; |
| 263 | } |
| 264 | |
| 265 | cmCMakePath path(status.GetMakefile().GetSafeDefinition(args[1])); |
| 266 | for (auto const& input : parser.GetInputs()) { |
| 267 | path /= input; |
| 268 | } |
| 269 | |
| 270 | status.GetMakefile().AddDefinition( |
| 271 | arguments.Output ? *arguments.Output : args[1], path.String()); |
| 272 | |
| 273 | return true; |
| 274 | } |
| 275 | |
| 276 | bool HandleAppendStringCommand(std::vector<std::string> const& args, |
| 277 | cmExecutionStatus& status) |
nothing calls this directly
no test coverage detected
searching dependent graphs…