| 1870 | } |
| 1871 | |
| 1872 | bool cmGlobalGenerator::DiscoverSyntheticTargets() |
| 1873 | { |
| 1874 | cmSyntheticTargetCache cache; |
| 1875 | |
| 1876 | for (auto const& gen : this->LocalGenerators) { |
| 1877 | // Because DiscoverSyntheticTargets() adds generator targets, we need to |
| 1878 | // cache the existing list of generator targets before starting. |
| 1879 | std::vector<cmGeneratorTarget*> genTargets; |
| 1880 | genTargets.reserve(gen->GetGeneratorTargets().size()); |
| 1881 | for (auto const& tgt : gen->GetGeneratorTargets()) { |
| 1882 | genTargets.push_back(tgt.get()); |
| 1883 | } |
| 1884 | |
| 1885 | for (auto* tgt : genTargets) { |
| 1886 | std::vector<std::string> const& configs = |
| 1887 | tgt->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); |
| 1888 | |
| 1889 | for (auto const& config : configs) { |
| 1890 | if (!tgt->DiscoverSyntheticTargets(cache, config)) { |
| 1891 | return false; |
| 1892 | } |
| 1893 | } |
| 1894 | } |
| 1895 | } |
| 1896 | |
| 1897 | return true; |
| 1898 | } |
| 1899 | |
| 1900 | bool cmGlobalGenerator::AddHeaderSetVerification() |
| 1901 | { |