| 6176 | } |
| 6177 | |
| 6178 | cmGeneratorTarget::Cxx20SupportLevel cmGeneratorTarget::HaveCxxModuleSupport( |
| 6179 | std::string const& config) const |
| 6180 | { |
| 6181 | auto const* state = this->Makefile->GetState(); |
| 6182 | if (!state->GetLanguageEnabled("CXX")) { |
| 6183 | return Cxx20SupportLevel::MissingCxx; |
| 6184 | } |
| 6185 | |
| 6186 | cmValue standardDefault = |
| 6187 | this->Makefile->GetDefinition("CMAKE_CXX_STANDARD_DEFAULT"); |
| 6188 | if (!standardDefault || standardDefault->empty()) { |
| 6189 | // We do not know any meaningful C++ standard levels for this compiler. |
| 6190 | return Cxx20SupportLevel::NoCxx20; |
| 6191 | } |
| 6192 | |
| 6193 | cmStandardLevelResolver standardResolver(this->Makefile); |
| 6194 | cmStandardLevel const cxxStd20 = |
| 6195 | *standardResolver.LanguageStandardLevel("CXX", "20"); |
| 6196 | cm::optional<cmStandardLevel> explicitLevel = |
| 6197 | this->GetExplicitStandardLevel("CXX", config); |
| 6198 | if (!explicitLevel || *explicitLevel < cxxStd20) { |
| 6199 | return Cxx20SupportLevel::NoCxx20; |
| 6200 | } |
| 6201 | |
| 6202 | cmValue scandepRule = |
| 6203 | this->Makefile->GetDefinition("CMAKE_CXX_SCANDEP_SOURCE"); |
| 6204 | if (!scandepRule) { |
| 6205 | return Cxx20SupportLevel::MissingRule; |
| 6206 | } |
| 6207 | return Cxx20SupportLevel::Supported; |
| 6208 | } |
| 6209 | |
| 6210 | void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const |
| 6211 | { |
no test coverage detected