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

Method ApplyLWYUToLinkerCommand

Source/cmFastbuildNormalTargetGenerator.cxx:371–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void cmFastbuildNormalTargetGenerator::ApplyLWYUToLinkerCommand(
372 FastbuildLinkerNode& linkerNode)
373{
374 cmValue const lwyuCheck =
375 this->Makefile->GetDefinition("CMAKE_LINK_WHAT_YOU_USE_CHECK");
376 if (this->UseLWYU && lwyuCheck) {
377 LogMessage("UseLWYU=true");
378 std::string args = " -E __run_co_compile --lwyu=";
379 args += this->GetLocalGenerator()->EscapeForShell(*lwyuCheck);
380
381 args += cmStrCat(
382 " --source=",
383 this->ConvertToFastbuildPath(this->GetGeneratorTarget()->GetFullPath(
384 Config, cmStateEnums::RuntimeBinaryArtifact,
385 /*realname=*/true)));
386
387 LogMessage("LWUY args: " + args);
388 linkerNode.LinkerStampExe = cmSystemTools::GetCMakeCommand();
389 linkerNode.LinkerStampExeArgs = std::move(args);
390 }
391}
392
393std::string cmFastbuildNormalTargetGenerator::ComputeDefines(
394 cmSourceFile const& srcFile)

Callers

nothing calls this directly

Calls 8

moveFunction · 0.85
EscapeForShellMethod · 0.80
cmStrCatFunction · 0.70
GetDefinitionMethod · 0.45
GetLocalGeneratorMethod · 0.45
GetFullPathMethod · 0.45
GetGeneratorTargetMethod · 0.45

Tested by

no test coverage detected