summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-11 12:16:44 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-13 18:27:36 (GMT)
commitdb8425be18439c899c08294dde117cc137c75d23 (patch)
treedf00abdcbbb4d074f58d720c6bdc1b9dec8875d2 /Source/cmake.cxx
parent74de9a734c92288fb3e602be0d1c967b33b67443 (diff)
downloadCMake-db8425be18439c899c08294dde117cc137c75d23.zip
CMake-db8425be18439c899c08294dde117cc137c75d23.tar.gz
CMake-db8425be18439c899c08294dde117cc137c75d23.tar.bz2
cmake: Get enabled languages from cmState.
The check for a global generator is redundant - the enabled languages are only populated by the global generator.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 6adecee..94b0ae0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2343,14 +2343,9 @@ const char *cmake::GetProperty(const std::string& prop,
}
else if ( prop == "ENABLED_LANGUAGES" )
{
- std::string lang;
- if(this->GlobalGenerator)
- {
- std::vector<std::string> enLangs;
- this->GlobalGenerator->GetEnabledLanguages(enLangs);
- lang = cmJoin(enLangs, ";");
- }
- this->SetProperty("ENABLED_LANGUAGES", lang.c_str());
+ std::string langs;
+ langs = cmJoin(this->State->GetEnabledLanguages(), ";");
+ this->SetProperty("ENABLED_LANGUAGES", langs.c_str());
}
#define STRING_LIST_ELEMENT(F) ";" #F
if (prop == "CMAKE_C_KNOWN_FEATURES")