| 823 | } |
| 824 | |
| 825 | bool cmLocalGenerator::ComputeTargetCompileFeatures() |
| 826 | { |
| 827 | // Collect the set of configuration types. |
| 828 | std::vector<std::string> configNames = |
| 829 | this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); |
| 830 | |
| 831 | using LanguagePair = std::pair<std::string, std::string>; |
| 832 | std::vector<LanguagePair> pairedLanguages{ |
| 833 | { "OBJC", "C" }, { "OBJCXX", "CXX" }, { "CUDA", "CXX" }, { "HIP", "CXX" } |
| 834 | }; |
| 835 | std::set<LanguagePair> inferredEnabledLanguages; |
| 836 | for (auto const& lang : pairedLanguages) { |
| 837 | if (this->Makefile->GetState()->GetLanguageEnabled(lang.first)) { |
| 838 | inferredEnabledLanguages.insert(lang); |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | // Process compile features of all targets. |
| 843 | auto const& targets = this->GetGeneratorTargets(); |
| 844 | for (auto const& target : targets) { |
| 845 | for (std::string const& c : configNames) { |
| 846 | if (!target->ComputeCompileFeatures(c)) { |
| 847 | return false; |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | // Now that C/C++ _STANDARD values have been computed |
| 852 | // set the values to ObjC/ObjCXX _STANDARD variables |
| 853 | if (target->CanCompileSources()) { |
| 854 | for (std::string const& c : configNames) { |
| 855 | target->ComputeCompileFeatures(c, inferredEnabledLanguages); |
| 856 | } |
| 857 | } |
| 858 | } |
| 859 | |
| 860 | return true; |
| 861 | } |
| 862 | |
| 863 | bool cmLocalGenerator::IsRootMakefile() const |
| 864 | { |
no test coverage detected