clean up flags with _init flags

This commit is contained in:
Bill Hoffman
2002-11-11 12:31:46 -05:00
parent 5b9a880bfb
commit d1051bb575
13 changed files with 92 additions and 76 deletions
+2
View File
@@ -1,3 +1,5 @@
link flags
Variables:
CMAKE_SYSTEM
+14 -7
View File
@@ -76,24 +76,31 @@ void cmGlobalUnixMakefileGenerator::EnableLanguage(const char* lang,
std::string fpath = rootBin;
fpath += "/CMakeSystem.cmake";
mf->ReadListFile(0,fpath.c_str());
if(!mf->GetDefinition("CMAKE_SYSTEM_LOADED"))
{
fpath += "/CMakeSystem.cmake";
mf->ReadListFile(0,fpath.c_str());
}
// if C, then enable C
if(lang[0] == 'C')
if(lang[0] == 'C' && !mf->GetDefinition("CMAKE_C_COMPILER_LOADED"))
{
fpath = rootBin;
fpath += "/CMakeCCompiler.cmake";
mf->ReadListFile(0,fpath.c_str());
}
if(strcmp(lang, "CXX") == 0)
if(strcmp(lang, "CXX") == 0 && !mf->GetDefinition("CMAKE_CXX_COMPILER_LOADED"))
{
fpath = rootBin;
fpath += "/CMakeCXXCompiler.cmake";
mf->ReadListFile(0,fpath.c_str());
}
fpath = root;
fpath += "/Modules/CMakeSystemSpecificInformation.cmake";
mf->ReadListFile(0,fpath.c_str());
if(!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED"))
{
fpath = root;
fpath += "/Modules/CMakeSystemSpecificInformation.cmake";
mf->ReadListFile(0,fpath.c_str());
}
if(!m_CMakeInstance->GetLocal())
{
// At this point we should have enough info for a try compile