MCPcopy Create free account
hub / github.com/Kitware/CMake / EnableLanguage

Method EnableLanguage

Source/cmGlobalNinjaGenerator.cxx:971–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969}
970
971void cmGlobalNinjaGenerator::EnableLanguage(
972 std::vector<std::string> const& langs, cmMakefile* mf, bool optional)
973{
974 if (this->IsMultiConfig()) {
975 mf->InitCMAKE_CONFIGURATION_TYPES("Debug;Release;RelWithDebInfo");
976 }
977
978 this->cmGlobalGenerator::EnableLanguage(langs, mf, optional);
979 for (std::string const& l : langs) {
980 if (l == "NONE") {
981 continue;
982 }
983 this->ResolveLanguageCompiler(l, mf, optional);
984#ifdef _WIN32
985 std::string const& compilerId =
986 mf->GetSafeDefinition(cmStrCat("CMAKE_", l, "_COMPILER_ID"));
987 std::string const& simulateId =
988 mf->GetSafeDefinition(cmStrCat("CMAKE_", l, "_SIMULATE_ID"));
989 std::string const& compilerFrontendVariant = mf->GetSafeDefinition(
990 cmStrCat("CMAKE_", l, "_COMPILER_FRONTEND_VARIANT"));
991 if (DetectGCCOnWindows(compilerId, simulateId, compilerFrontendVariant)) {
992 this->MarkAsGCCOnWindows();
993 }
994#endif
995 }
996}
997
998// Implemented by:
999// cmGlobalUnixMakefileGenerator3

Callers

nothing calls this directly

Calls 6

MarkAsGCCOnWindowsMethod · 0.95
DetectGCCOnWindowsFunction · 0.85
cmStrCatFunction · 0.70
IsMultiConfigMethod · 0.45

Tested by

no test coverage detected