| 301 | } |
| 302 | |
| 303 | bool HandleRemoveFilenameCommand(std::vector<std::string> const& args, |
| 304 | cmExecutionStatus& status) |
| 305 | { |
| 306 | static OutputVariableParser const parser{}; |
| 307 | |
| 308 | auto const arguments = parser.Parse(args); |
| 309 | |
| 310 | if (arguments.MaybeReportError(status.GetMakefile())) { |
| 311 | return true; |
| 312 | } |
| 313 | |
| 314 | if (!parser.GetInputs().empty()) { |
| 315 | status.SetError("REMOVE_FILENAME called with unexpected arguments."); |
| 316 | return false; |
| 317 | } |
| 318 | |
| 319 | std::string inputPath; |
| 320 | if (!getInputPath(args[1], status, inputPath)) { |
| 321 | return false; |
| 322 | } |
| 323 | |
| 324 | cmCMakePath path(inputPath); |
| 325 | path.RemoveFileName(); |
| 326 | |
| 327 | status.GetMakefile().AddDefinition( |
| 328 | arguments.Output ? *arguments.Output : args[1], path.String()); |
| 329 | |
| 330 | return true; |
| 331 | } |
| 332 | |
| 333 | bool HandleReplaceFilenameCommand(std::vector<std::string> const& args, |
| 334 | cmExecutionStatus& status) |
nothing calls this directly
no test coverage detected
searching dependent graphs…