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

Method AddCompilerLaunchersForLanguages

Source/cmFastbuildNormalTargetGenerator.cxx:745–771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743}
744
745void cmFastbuildNormalTargetGenerator::AddCompilerLaunchersForLanguages()
746{
747 // General rule for all languages.
748 std::string const launchCompile = this->GetLocalGenerator()->GetRuleLauncher(
749 this->GetGeneratorTarget(), "RULE_LAUNCH_COMPILE", Config);
750 // See if we need to use a compiler launcher like ccache or distcc
751 for (std::string const& language : Languages) {
752 std::string const compilerLauncher =
753 cmCommonTargetGenerator::GetCompilerLauncher(language, Config);
754 LogMessage("compilerLauncher: " + compilerLauncher);
755 std::vector<std::string> expanded;
756 cmExpandList(compilerLauncher, expanded);
757
758 if (!expanded.empty()) {
759 std::string const exe = expanded[0];
760 expanded.erase(expanded.begin());
761 this->GetGlobalGenerator()->AddLauncher(FASTBUILD_LAUNCHER_PREFIX, exe,
762 language, cmJoin(expanded, " "));
763 } else if (!launchCompile.empty()) {
764 std::string exe;
765 std::string args;
766 cmSystemTools::SplitProgramFromArgs(launchCompile, exe, args);
767 this->GetGlobalGenerator()->AddLauncher(FASTBUILD_LAUNCHER_PREFIX, exe,
768 language, args);
769 }
770 }
771}
772void cmFastbuildNormalTargetGenerator::AddLinkerLauncher()
773{
774 std::string const linkerLauncher =

Callers

nothing calls this directly

Calls 10

cmExpandListFunction · 0.85
GetRuleLauncherMethod · 0.80
eraseMethod · 0.80
AddLauncherMethod · 0.80
cmJoinFunction · 0.70
GetLocalGeneratorMethod · 0.45
GetGeneratorTargetMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
GetGlobalGeneratorMethod · 0.45

Tested by

no test coverage detected