| 1584 | } |
| 1585 | |
| 1586 | void cmGlobalFastbuildGenerator::AddGlobCheckExec() |
| 1587 | { |
| 1588 | // Tested in "RunCMake.file" test. |
| 1589 | std::string const globScript = |
| 1590 | this->GetCMakeInstance()->GetGlobVerifyScript(); |
| 1591 | if (!globScript.empty()) { |
| 1592 | |
| 1593 | FastbuildExecNode globCheck; |
| 1594 | globCheck.Name = FASTBUILD_GLOB_CHECK_TARGET; |
| 1595 | globCheck.ExecExecutable = cmSystemTools::GetCMakeCommand(); |
| 1596 | globCheck.ExecArguments = |
| 1597 | cmStrCat("-P ", this->ConvertToFastbuildPath(globScript)); |
| 1598 | globCheck.ExecAlways = false; |
| 1599 | globCheck.ExecUseStdOutAsOutput = false; |
| 1600 | auto const cache = this->GetCMakeInstance()->GetGlobCacheEntries(); |
| 1601 | for (auto const& entry : cache) { |
| 1602 | auto path = cmSystemTools::GetFilenamePath(entry.Expression); |
| 1603 | auto expression = cmSystemTools::GetFilenameName(entry.Expression); |
| 1604 | if (std::find(globCheck.ExecInputPath.begin(), |
| 1605 | globCheck.ExecInputPath.end(), |
| 1606 | path) == globCheck.ExecInputPath.end()) { |
| 1607 | globCheck.ExecInputPath.emplace_back(std::move(path)); |
| 1608 | } |
| 1609 | if (std::find(globCheck.ExecInputPattern.begin(), |
| 1610 | globCheck.ExecInputPattern.end(), |
| 1611 | expression) == globCheck.ExecInputPattern.end()) { |
| 1612 | globCheck.ExecInputPattern.emplace_back(std::move(expression)); |
| 1613 | } |
| 1614 | } |
| 1615 | globCheck.ExecOutput = this->ConvertToFastbuildPath( |
| 1616 | this->GetCMakeInstance()->GetGlobVerifyStamp()); |
| 1617 | this->AddTarget(std::move(globCheck)); |
| 1618 | } |
| 1619 | } |
| 1620 | void cmGlobalFastbuildGenerator::WriteSolution() |
| 1621 | { |
| 1622 | std::string const solutionName = LocalGenerators[0]->GetProjectName(); |
nothing calls this directly
no test coverage detected