MCPcopy Create free account
hub / github.com/Kitware/CMake / AddGlobCheckExec

Method AddGlobCheckExec

Source/cmGlobalFastbuildGenerator.cxx:1586–1619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1584}
1585
1586void 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}
1620void cmGlobalFastbuildGenerator::WriteSolution()
1621{
1622 std::string const solutionName = LocalGenerators[0]->GetProjectName();

Callers

nothing calls this directly

Calls 11

AddTargetMethod · 0.95
moveFunction · 0.85
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
findFunction · 0.50
GetCMakeInstanceMethod · 0.45
emptyMethod · 0.45
GetGlobCacheEntriesMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected