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

Method DumpInterfaceSource

Source/cmFileAPICodemodel.cxx:1900–1925  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1898}
1899
1900Json::Value Target::DumpInterfaceSource(std::string path, Json::ArrayIndex si,
1901 FileSetDatabase const& fsdb)
1902{
1903 Json::Value source = Json::objectValue;
1904
1905 cmSourceFile* sf = this->GT->Makefile->GetOrCreateSource(path);
1906 path = sf->ResolveFullPath();
1907 source["path"] = RelativeIfUnder(this->TopSource, path);
1908 if (sf->GetIsGenerated()) {
1909 source["isGenerated"] = true;
1910 }
1911
1912 auto fsit = fsdb.find(path);
1913 if (fsit != fsdb.end()) {
1914 source["fileSetIndex"] = fsit->second;
1915 }
1916
1917 if (cmSourceGroup const* sg =
1918 this->GT->LocalGenerator->FindSourceGroup(path)) {
1919 Json::ArrayIndex const groupIndex = this->AddSourceGroup(sg);
1920 source["sourceGroupIndex"] = groupIndex;
1921 this->SourceGroups[groupIndex].InterfaceSourceIndexes.append(si);
1922 }
1923
1924 return source;
1925}
1926
1927Json::Value Target::DumpCompileData(CompileData const& cd)
1928{

Callers 1

DumpInterfaceSourcesMethod · 0.95

Calls 8

AddSourceGroupMethod · 0.95
RelativeIfUnderFunction · 0.85
GetOrCreateSourceMethod · 0.80
GetIsGeneratedMethod · 0.80
appendMethod · 0.80
findMethod · 0.45
endMethod · 0.45
FindSourceGroupMethod · 0.45

Tested by

no test coverage detected