| 1861 | } |
| 1862 | |
| 1863 | Json::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 | |
| 1900 | Json::Value Target::DumpInterfaceSource(std::string path, Json::ArrayIndex si, |
| 1901 | FileSetDatabase const& fsdb) |
no test coverage detected