summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-11 17:31:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-11 17:31:46 (GMT)
commitd1051bb575b2f1e568ac9fe4599a0bf0eea66392 (patch)
tree5c16ebb0dc8c21698c38333eca4f5058492953c0 /Source/cmGlobalUnixMakefileGenerator.cxx
parent5b9a880bfbf215159d6960f82f0e78c419c95f8e (diff)
downloadCMake-d1051bb575b2f1e568ac9fe4599a0bf0eea66392.zip
CMake-d1051bb575b2f1e568ac9fe4599a0bf0eea66392.tar.gz
CMake-d1051bb575b2f1e568ac9fe4599a0bf0eea66392.tar.bz2
clean up flags with _init flags
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator.cxx b/Source/cmGlobalUnixMakefileGenerator.cxx
index aeb3e41..cccbaef 100644
--- a/Source/cmGlobalUnixMakefileGenerator.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator.cxx
@@ -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