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

Method DumpInterfaceSources

Source/cmFileAPICodemodel.cxx:1863–1898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1861}
1862
1863Json::Value Target::DumpInterfaceSources(FileSetDatabase const& fsdb)
1864{
1865 Json::Value interfaceSources = Json::arrayValue;
1866 auto dumpFile = [this, &interfaceSources, &fsdb](std::string const& file) {
1867 std::string path = file;
1868 if (!cmSystemTools::FileIsFullPath(path)) {
1869 path = cmStrCat(
1870 this->GT->GetLocalGenerator()->GetCurrentSourceDirectory(), '/', file);
1871 }
1872 path = cmSystemTools::CollapseFullPath(path);
1873
1874 interfaceSources.append(
1875 this->DumpInterfaceSource(path, interfaceSources.size(), fsdb));
1876 };
1877
1878 cmValue prop = this->GT->GetProperty("INTERFACE_SOURCES");
1879 if (prop) {
1880 cmList files{ cmGeneratorExpression::Evaluate(
1881 *prop, this->GT->GetLocalGenerator(), this->Config, this->GT) };
1882
1883 for (std::string const& file : files) {
1884 dumpFile(file);
1885 }
1886 }
1887
1888 for (auto const& fsIter : fsdb) {
1889 Json::ArrayIndex const index = fsIter.second;
1890 // FileSetVisibilities was populated by DumpFileSets() and will always
1891 // have the same size as the file sets array that index is indexing into
1892 if (this->FileSetVisibilities[index] != cmFileSetVisibility::Private) {
1893 dumpFile(fsIter.first);
1894 }
1895 }
1896
1897 return interfaceSources;
1898}
1899
1900Json::Value Target::DumpInterfaceSource(std::string path, Json::ArrayIndex si,
1901 FileSetDatabase const& fsdb)

Callers 1

DumpMethod · 0.95

Calls 6

DumpInterfaceSourceMethod · 0.95
appendMethod · 0.80
cmStrCatFunction · 0.70
GetLocalGeneratorMethod · 0.45
sizeMethod · 0.45
GetPropertyMethod · 0.45

Tested by

no test coverage detected