| 704 | } |
| 705 | |
| 706 | cmValue cmStandardLevelResolver::CompileFeaturesAvailable( |
| 707 | std::string const& lang, std::string* error) const |
| 708 | { |
| 709 | if (!this->Makefile->GetGlobalGenerator()->GetLanguageEnabled(lang)) { |
| 710 | std::ostringstream e; |
| 711 | if (error) { |
| 712 | e << "cannot"; |
| 713 | } else { |
| 714 | e << "Cannot"; |
| 715 | } |
| 716 | e << " use features from non-enabled language " << lang; |
| 717 | if (error) { |
| 718 | *error = e.str(); |
| 719 | } else { |
| 720 | this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); |
| 721 | } |
| 722 | return nullptr; |
| 723 | } |
| 724 | |
| 725 | cmValue featuresKnown = this->Makefile->GetDefinition( |
| 726 | cmStrCat("CMAKE_", lang, "_COMPILE_FEATURES")); |
| 727 | |
| 728 | if (!cmNonempty(featuresKnown)) { |
| 729 | std::ostringstream e; |
| 730 | if (error) { |
| 731 | e << "no"; |
| 732 | } else { |
| 733 | e << "No"; |
| 734 | } |
| 735 | e << " known features for " << lang << " compiler\n\"" |
| 736 | << this->Makefile->GetSafeDefinition( |
| 737 | cmStrCat("CMAKE_", lang, "_COMPILER_ID")) |
| 738 | << "\"\nversion " |
| 739 | << this->Makefile->GetSafeDefinition( |
| 740 | cmStrCat("CMAKE_", lang, "_COMPILER_VERSION")) |
| 741 | << '.'; |
| 742 | if (error) { |
| 743 | *error = e.str(); |
| 744 | } else { |
| 745 | this->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str()); |
| 746 | } |
| 747 | return nullptr; |
| 748 | } |
| 749 | return featuresKnown; |
| 750 | } |
| 751 | |
| 752 | bool cmStandardLevelResolver::GetNewRequiredStandard( |
| 753 | std::string const& targetName, std::string const& feature, |
no test coverage detected