STYLE: determineLanguageCalled removed, now the conditional code is directly
called in the only place where it could be set to true Alex
This commit is contained in:
parent
0f4ad19ef8
commit
1b68e41b08
|
@ -268,7 +268,6 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||||
this->SetLanguageEnabled("NONE", mf);
|
this->SetLanguageEnabled("NONE", mf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
bool determineLanguageCalled = false;
|
|
||||||
std::string loadedLang = "CMAKE_";
|
std::string loadedLang = "CMAKE_";
|
||||||
loadedLang += lang;
|
loadedLang += lang;
|
||||||
loadedLang += "_COMPILER_LOADED";
|
loadedLang += "_COMPILER_LOADED";
|
||||||
|
@ -324,7 +323,6 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||||
determineFile.c_str());
|
determineFile.c_str());
|
||||||
}
|
}
|
||||||
needTestLanguage[lang] = true;
|
needTestLanguage[lang] = true;
|
||||||
determineLanguageCalled = true;
|
|
||||||
// Some generators like visual studio should not use the env variables
|
// Some generators like visual studio should not use the env variables
|
||||||
// So the global generator can specify that in this variable
|
// So the global generator can specify that in this variable
|
||||||
if(!mf->GetDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV"))
|
if(!mf->GetDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV"))
|
||||||
|
@ -346,11 +344,9 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||||
env += envVarValue;
|
env += envVarValue;
|
||||||
cmSystemTools::PutEnv(env.c_str());
|
cmSystemTools::PutEnv(env.c_str());
|
||||||
}
|
}
|
||||||
} // end if(!this->GetLanguageEnabled(lang) )
|
|
||||||
// if determineLanguage was called then load the file it
|
// if determineLanguage was called then load the file it
|
||||||
// configures CMake(LANG)Compiler.cmake
|
// configures CMake(LANG)Compiler.cmake
|
||||||
if(determineLanguageCalled)
|
|
||||||
{
|
|
||||||
fpath = rootBin;
|
fpath = rootBin;
|
||||||
fpath += "/CMake";
|
fpath += "/CMake";
|
||||||
fpath += lang;
|
fpath += lang;
|
||||||
|
@ -366,7 +362,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
||||||
// not know if it is a working compiler yet so set the test language
|
// not know if it is a working compiler yet so set the test language
|
||||||
// flag
|
// flag
|
||||||
needTestLanguage[lang] = true;
|
needTestLanguage[lang] = true;
|
||||||
}
|
} // end if(!this->GetLanguageEnabled(lang) )
|
||||||
} // end loop over languages
|
} // end loop over languages
|
||||||
|
|
||||||
// **** Load the system specific information if not yet loaded
|
// **** Load the system specific information if not yet loaded
|
||||||
|
|
Loading…
Reference in New Issue