| 349 | } |
| 350 | |
| 351 | void cmFastbuildTargetGenerator::GetDepends( |
| 352 | cmCustomCommandGenerator const& ccg, std::string const& currentCCName, |
| 353 | std::vector<std::string>& fileLevelDeps, |
| 354 | std::set<FastbuildTargetDep>& targetDep) const |
| 355 | { |
| 356 | for (auto dep : ccg.GetDepends()) { |
| 357 | LogMessage("Dep: " + dep); |
| 358 | auto orig = dep; |
| 359 | if (this->LocalCommonGenerator->GetRealDependency(dep, Config, dep)) { |
| 360 | LogMessage("Real dep: " + dep); |
| 361 | if (!dep.empty()) { |
| 362 | LogMessage("Custom command real dep: " + dep); |
| 363 | for (auto const& item : cmList{ cmGeneratorExpression::Evaluate( |
| 364 | this->ConvertToFastbuildPath(dep), this->LocalGenerator, |
| 365 | Config) }) { |
| 366 | fileLevelDeps.emplace_back(item); |
| 367 | } |
| 368 | } |
| 369 | } |
| 370 | dep = this->ConvertToFastbuildPath(dep); |
| 371 | LogMessage("Real dep converted: " + dep); |
| 372 | |
| 373 | auto const targetInfo = this->LocalGenerator->GetSourcesWithOutput(dep); |
| 374 | if (targetInfo.Target) { |
| 375 | LogMessage( |
| 376 | cmStrCat("dep: ", dep, ", target: ", targetInfo.Target->GetName())); |
| 377 | auto const& target = targetInfo.Target; |
| 378 | auto const processCCs = [this, ¤tCCName, &targetDep, |
| 379 | dep](std::vector<cmCustomCommand> const& ccs, |
| 380 | FastbuildBuildStep step) { |
| 381 | for (auto const& cc : ccs) { |
| 382 | for (auto const& output : cc.GetOutputs()) { |
| 383 | LogMessage(cmStrCat("dep: ", dep, ", post output: ", |
| 384 | this->ConvertToFastbuildPath(output))); |
| 385 | if (this->ConvertToFastbuildPath(output) == dep) { |
| 386 | auto ccName = this->GetCustomCommandTargetName(cc, step); |
| 387 | if (ccName != currentCCName) { |
| 388 | LogMessage("Additional CC dep from target: " + ccName); |
| 389 | targetDep.emplace(std::move(ccName)); |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | for (auto const& byproduct : cc.GetByproducts()) { |
| 394 | LogMessage(cmStrCat("dep: ", dep, ", post byproduct: ", |
| 395 | this->ConvertToFastbuildPath(byproduct))); |
| 396 | if (this->ConvertToFastbuildPath(byproduct) == dep) { |
| 397 | auto ccName = this->GetCustomCommandTargetName(cc, step); |
| 398 | if (ccName != currentCCName) { |
| 399 | LogMessage("Additional CC dep from target: " + ccName); |
| 400 | targetDep.emplace(std::move(ccName)); |
| 401 | } |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | }; |
| 406 | processCCs(target->GetPreBuildCommands(), FastbuildBuildStep::PRE_BUILD); |
| 407 | processCCs(target->GetPreLinkCommands(), FastbuildBuildStep::PRE_LINK); |
| 408 | processCCs(target->GetPostBuildCommands(), |
no test coverage detected