| 5068 | |
| 5069 | namespace detail { |
| 5070 | void AddCustomCommandToTarget(cmLocalGenerator& lg, cmCommandOrigin origin, |
| 5071 | cmTarget* target, cmCustomCommandType type, |
| 5072 | std::unique_ptr<cmCustomCommand> cc) |
| 5073 | { |
| 5074 | // Add the command to the appropriate build step for the target. |
| 5075 | cc->SetEscapeAllowMakeVars(true); |
| 5076 | cc->SetTarget(target->GetName()); |
| 5077 | |
| 5078 | lg.AddTargetByproducts(target, cc->GetByproducts(), cc->GetBacktrace(), |
| 5079 | origin); |
| 5080 | |
| 5081 | switch (type) { |
| 5082 | case cmCustomCommandType::PRE_BUILD: |
| 5083 | target->AddPreBuildCommand(std::move(*cc)); |
| 5084 | break; |
| 5085 | case cmCustomCommandType::PRE_LINK: |
| 5086 | target->AddPreLinkCommand(std::move(*cc)); |
| 5087 | break; |
| 5088 | case cmCustomCommandType::POST_BUILD: |
| 5089 | target->AddPostBuildCommand(std::move(*cc)); |
| 5090 | break; |
| 5091 | } |
| 5092 | |
| 5093 | cc.reset(); |
| 5094 | } |
| 5095 | |
| 5096 | cmSourceFile* AddCustomCommandToOutput(cmLocalGenerator& lg, |
| 5097 | cmCommandOrigin origin, |
no test coverage detected
searching dependent graphs…