summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-11 18:28:31 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-11 18:28:31 (GMT)
commit1b68e41b084e6a1f2451ee5eb616abede6f8bc0f (patch)
treee9b0048f78238c487e67fcc899d3e81f9e773fd2
parent0f4ad19ef8add833dd362094b01cc832d44e59fc (diff)
downloadCMake-1b68e41b084e6a1f2451ee5eb616abede6f8bc0f.zip
CMake-1b68e41b084e6a1f2451ee5eb616abede6f8bc0f.tar.gz
CMake-1b68e41b084e6a1f2451ee5eb616abede6f8bc0f.tar.bz2
STYLE: determineLanguageCalled removed, now the conditional code is directly
called in the only place where it could be set to true Alex
-rw-r--r--Source/cmGlobalGenerator.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 906ea8c..e75f25d 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -268,7 +268,6 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
this->SetLanguageEnabled("NONE", mf);
continue;
}
- bool determineLanguageCalled = false;
std::string loadedLang = "CMAKE_";
loadedLang += lang;
loadedLang += "_COMPILER_LOADED";
@@ -324,7 +323,6 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
determineFile.c_str());
}
needTestLanguage[lang] = true;
- determineLanguageCalled = true;
// Some generators like visual studio should not use the env variables
// So the global generator can specify that in this variable
if(!mf->GetDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV"))
@@ -346,11 +344,9 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
env += envVarValue;
cmSystemTools::PutEnv(env.c_str());
}
- } // end if(!this->GetLanguageEnabled(lang) )
- // if determineLanguage was called then load the file it
- // configures CMake(LANG)Compiler.cmake
- if(determineLanguageCalled)
- {
+
+ // if determineLanguage was called then load the file it
+ // configures CMake(LANG)Compiler.cmake
fpath = rootBin;
fpath += "/CMake";
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
// flag
needTestLanguage[lang] = true;
- }
+ } // end if(!this->GetLanguageEnabled(lang) )
} // end loop over languages
// **** Load the system specific information if not yet loaded