| 1863 | } |
| 1864 | |
| 1865 | bool cmQtAutoGenInitializer::SetupWriteAutogenInfo() |
| 1866 | { |
| 1867 | // Utility lambdas |
| 1868 | auto MfDef = [this](std::string const& key) { |
| 1869 | return this->Makefile->GetSafeDefinition(key); |
| 1870 | }; |
| 1871 | |
| 1872 | // Filtered headers and sources |
| 1873 | std::set<std::string> moc_skip; |
| 1874 | std::set<std::string> uic_skip; |
| 1875 | std::vector<MUFile const*> headers; |
| 1876 | std::vector<MUFile const*> sources; |
| 1877 | |
| 1878 | // Filter headers |
| 1879 | { |
| 1880 | headers.reserve(this->AutogenTarget.Headers.size()); |
| 1881 | for (auto const& pair : this->AutogenTarget.Headers) { |
| 1882 | MUFile const* const muf = pair.second.get(); |
| 1883 | if (muf->SkipMoc) { |
| 1884 | moc_skip.insert(muf->FullPath); |
| 1885 | } |
| 1886 | if (muf->SkipUic) { |
| 1887 | uic_skip.insert(muf->FullPath); |
| 1888 | } |
| 1889 | if (muf->Generated && !this->CMP0071Accept) { |
| 1890 | continue; |
| 1891 | } |
| 1892 | if (muf->MocIt || muf->UicIt) { |
| 1893 | headers.emplace_back(muf); |
| 1894 | } |
| 1895 | } |
| 1896 | std::sort(headers.begin(), headers.end(), |
| 1897 | [](MUFile const* a, MUFile const* b) { |
| 1898 | return (a->FullPath < b->FullPath); |
| 1899 | }); |
| 1900 | } |
| 1901 | |
| 1902 | // Filter sources |
| 1903 | { |
| 1904 | sources.reserve(this->AutogenTarget.Sources.size()); |
| 1905 | for (auto const& pair : this->AutogenTarget.Sources) { |
| 1906 | MUFile const* const muf = pair.second.get(); |
| 1907 | if (muf->Generated && !this->CMP0071Accept) { |
| 1908 | continue; |
| 1909 | } |
| 1910 | if (muf->SkipMoc) { |
| 1911 | moc_skip.insert(muf->FullPath); |
| 1912 | } |
| 1913 | if (muf->SkipUic) { |
| 1914 | uic_skip.insert(muf->FullPath); |
| 1915 | } |
| 1916 | if (muf->MocIt || muf->UicIt) { |
| 1917 | sources.emplace_back(muf); |
| 1918 | } |
| 1919 | } |
| 1920 | std::sort(sources.begin(), sources.end(), |
| 1921 | [](MUFile const* a, MUFile const* b) { |
| 1922 | return (a->FullPath < b->FullPath); |
no test coverage detected