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

Method WriteCxxModuleLibraryStatement

Source/cmNinjaNormalTargetGenerator.cxx:1768–1794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1766}
1767
1768void cmNinjaNormalTargetGenerator::WriteCxxModuleLibraryStatement(
1769 std::string const& config, std::string const& /*fileConfig*/,
1770 bool firstForConfig)
1771{
1772 // TODO: How to use `fileConfig` properly?
1773
1774 // Write a phony output that depends on the scanning output.
1775 {
1776 cmNinjaBuild build("phony");
1777 build.Comment =
1778 cmStrCat("Imported C++ module library ", this->GetTargetName());
1779 this->GetLocalGenerator()->AppendTargetOutputs(this->GetGeneratorTarget(),
1780 build.Outputs, config);
1781 if (firstForConfig) {
1782 this->GetLocalGenerator()->AppendTargetOutputs(
1783 this->GetGeneratorTarget(),
1784 this->GetGlobalGenerator()->GetByproductsForCleanTarget(config),
1785 config);
1786 }
1787 build.ExplicitDeps.emplace_back(this->GetDyndepFilePath("CXX", config));
1788 this->GetGlobalGenerator()->WriteBuild(this->GetCommonFileStream(), build);
1789 }
1790
1791 // Add aliases for the target name.
1792 this->GetGlobalGenerator()->AddTargetAlias(
1793 this->GetTargetName(), this->GetGeneratorTarget(), config);
1794}
1795
1796cmGeneratorTarget::Names cmNinjaNormalTargetGenerator::TargetNames(
1797 std::string const& config) const

Callers 1

GenerateMethod · 0.95

Calls 11

emplace_backMethod · 0.80
GetDyndepFilePathMethod · 0.80
WriteBuildMethod · 0.80
AddTargetAliasMethod · 0.80
cmStrCatFunction · 0.70
GetTargetNameMethod · 0.45
AppendTargetOutputsMethod · 0.45
GetLocalGeneratorMethod · 0.45
GetGeneratorTargetMethod · 0.45
GetGlobalGeneratorMethod · 0.45
GetCommonFileStreamMethod · 0.45

Tested by

no test coverage detected