| 450 | } |
| 451 | |
| 452 | FastbuildExecNode cmFastbuildTargetGenerator::GetAppleTextStubCommand() const |
| 453 | { |
| 454 | FastbuildExecNode res; |
| 455 | if (!this->GeneratorTarget->IsApple() || |
| 456 | !this->GeneratorTarget->HasImportLibrary(Config)) { |
| 457 | return res; |
| 458 | } |
| 459 | |
| 460 | auto const names = DetectOutput(); |
| 461 | std::string const outpathImp = |
| 462 | this->ConvertToFastbuildPath(this->GeneratorTarget->GetDirectory( |
| 463 | Config, cmStateEnums::ImportLibraryArtifact)); |
| 464 | |
| 465 | std::string const binPath = |
| 466 | this->ConvertToFastbuildPath(this->GeneratorTarget->GetDirectory( |
| 467 | Config, cmStateEnums::RuntimeBinaryArtifact)); |
| 468 | |
| 469 | cmSystemTools::MakeDirectory(outpathImp); |
| 470 | |
| 471 | std::string rule = this->LocalGenerator->GetMakefile()->GetSafeDefinition( |
| 472 | "CMAKE_CREATE_TEXT_STUBS"); |
| 473 | LogMessage("CMAKE_CREATE_TEXT_STUBS:" + rule); |
| 474 | |
| 475 | auto rulePlaceholderExpander = |
| 476 | this->GetLocalGenerator()->CreateRulePlaceholderExpander(); |
| 477 | |
| 478 | cmRulePlaceholderExpander::RuleVariables vars; |
| 479 | res.ExecOutput = cmStrCat(outpathImp, '/', names.ImportReal); |
| 480 | res.ExecInput = { cmStrCat(binPath, '/', names.SharedObject) }; |
| 481 | |
| 482 | vars.Target = res.ExecInput[0].c_str(); |
| 483 | rulePlaceholderExpander->SetTargetImpLib(res.ExecOutput); |
| 484 | rulePlaceholderExpander->ExpandRuleVariables(this->GetLocalGenerator(), rule, |
| 485 | vars); |
| 486 | |
| 487 | LogMessage("CMAKE_CREATE_TEXT_STUBS expanded:" + rule); |
| 488 | std::string executable; |
| 489 | std::string args; |
| 490 | if (!cmSystemTools::SplitProgramFromArgs(rule, executable, args)) { |
| 491 | cmSystemTools::Error("Failed to split program from args: " + rule); |
| 492 | return res; |
| 493 | } |
| 494 | |
| 495 | res.Name = cmStrCat("create_", names.ImportOutput, "_text_stub"); |
| 496 | res.ExecExecutable = std::move(executable); |
| 497 | res.ExecArguments = std::move(args); |
| 498 | res.ExecWorkingDir = this->LocalCommonGenerator->GetCurrentBinaryDirectory(); |
| 499 | |
| 500 | // Wait for the build. |
| 501 | res.PreBuildDependencies.emplace(this->GetTargetName()); |
| 502 | return res; |
| 503 | } |
| 504 | FastbuildExecNode cmFastbuildTargetGenerator::GetDepsCheckExec( |
| 505 | FastbuildExecNode const& depender) |
| 506 | { |
nothing calls this directly
no test coverage detected