| 321 | } |
| 322 | |
| 323 | char const* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const |
| 324 | { |
| 325 | // If the command is the plain name of an executable target, we replace it |
| 326 | // with the path to the executable artifact in the command config. |
| 327 | std::string const& argv0 = this->CommandLines[c][0]; |
| 328 | cmGeneratorTarget* target = this->LG->FindGeneratorTargetToUse(argv0); |
| 329 | if (target && target->GetType() == cmStateEnums::EXECUTABLE && |
| 330 | (target->IsImported() || |
| 331 | target->GetProperty("CROSSCOMPILING_EMULATOR") || |
| 332 | !this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) { |
| 333 | return target->GetLocation(this->CommandConfig).c_str(); |
| 334 | } |
| 335 | return nullptr; |
| 336 | } |
| 337 | |
| 338 | bool cmCustomCommandGenerator::HasOnlyEmptyCommandLines() const |
| 339 | { |
no test coverage detected