cmake: Get enabled languages from cmState.
The check for a global generator is redundant - the enabled languages are only populated by the global generator.
This commit is contained in:
parent
74de9a734c
commit
db8425be18
|
@ -2343,14 +2343,9 @@ const char *cmake::GetProperty(const std::string& prop,
|
||||||
}
|
}
|
||||||
else if ( prop == "ENABLED_LANGUAGES" )
|
else if ( prop == "ENABLED_LANGUAGES" )
|
||||||
{
|
{
|
||||||
std::string lang;
|
std::string langs;
|
||||||
if(this->GlobalGenerator)
|
langs = cmJoin(this->State->GetEnabledLanguages(), ";");
|
||||||
{
|
this->SetProperty("ENABLED_LANGUAGES", langs.c_str());
|
||||||
std::vector<std::string> enLangs;
|
|
||||||
this->GlobalGenerator->GetEnabledLanguages(enLangs);
|
|
||||||
lang = cmJoin(enLangs, ";");
|
|
||||||
}
|
|
||||||
this->SetProperty("ENABLED_LANGUAGES", lang.c_str());
|
|
||||||
}
|
}
|
||||||
#define STRING_LIST_ELEMENT(F) ";" #F
|
#define STRING_LIST_ELEMENT(F) ";" #F
|
||||||
if (prop == "CMAKE_C_KNOWN_FEATURES")
|
if (prop == "CMAKE_C_KNOWN_FEATURES")
|
||||||
|
|
Loading…
Reference in New Issue