summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-03-10 18:39:38 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-03-10 18:39:38 (GMT)
commit3ff6722934521151793e5ad798a48305fc5ec2fa (patch)
tree44c00d047860311a0f52effb115de3257488e6c4 /Source/cmGlobalGenerator.cxx
parenta79868206eb59e19fd0ebca72ba435cdbb8c6a89 (diff)
downloadCMake-3ff6722934521151793e5ad798a48305fc5ec2fa.zip
CMake-3ff6722934521151793e5ad798a48305fc5ec2fa.tar.gz
CMake-3ff6722934521151793e5ad798a48305fc5ec2fa.tar.bz2
ENH: cleanup by removing all the olf local generate junk that i not longer needed
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx84
1 files changed, 27 insertions, 57 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 66b54ca..66c5b79 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -108,13 +108,8 @@ void cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
cmSystemTools::SetFatalErrorOccured();
return;
}
- // setup some variables for the EnableLanguage function
- bool isLocal = m_CMakeInstance->GetLocal();
- // if we are from the top, always define this
- if(!isLocal)
- {
- mf->AddDefinition("RUN_CONFIGURE", true);
- }
+
+ mf->AddDefinition("RUN_CONFIGURE", true);
bool needTestLanguage = false;
std::string rootBin = mf->GetHomeOutputDirectory();
// If the configuration files path has been set,
@@ -168,7 +163,7 @@ void cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
}
// **** Step 2, Load the CMakeDetermineSystem.cmake file and find out
// what platform we are running on
- if (!isLocal && !mf->GetDefinition("CMAKE_SYSTEM_NAME"))
+ if (!mf->GetDefinition("CMAKE_SYSTEM_NAME"))
{
#if defined(_WIN32) && !defined(__CYGWIN__)
/* Windows version number data. */
@@ -200,7 +195,7 @@ void cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
l != languages.end(); ++l)
{
const char* lang = l->c_str();
- if(!isLocal && !this->GetLanguageEnabled(lang) )
+ if(!this->GetLanguageEnabled(lang) )
{
if (m_CMakeInstance->GetIsInTryCompile())
{
@@ -322,39 +317,36 @@ void cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// **** Step 7, Test the compiler for the language just setup
// At this point we should have enough info for a try compile
// which is used in the backward stuff
- if(!isLocal)
+ if(needTestLanguage)
{
- if(needTestLanguage)
+ if (!m_CMakeInstance->GetIsInTryCompile())
{
- if (!m_CMakeInstance->GetIsInTryCompile())
+ std::string testLang = "CMakeTest";
+ testLang += lang;
+ testLang += "Compiler.cmake";
+ std::string ifpath = mf->GetModulesFile(testLang.c_str());
+ if(!mf->ReadListFile(0,ifpath.c_str()))
{
- std::string testLang = "CMakeTest";
- testLang += lang;
- testLang += "Compiler.cmake";
- std::string ifpath = mf->GetModulesFile(testLang.c_str());
- if(!mf->ReadListFile(0,ifpath.c_str()))
+ cmSystemTools::Error("Could not find cmake module file:", ifpath.c_str());
+ }
+ // **** Step 8, load backwards compatibility stuff for C and CXX
+ // for old versions of CMake ListFiles C and CXX had some
+ // backwards compatibility files they have to load
+ const char* versionValue
+ = mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
+ if (atof(versionValue) <= 1.4)
+ {
+ if(strcmp(lang, "C") == 0)
{
- cmSystemTools::Error("Could not find cmake module file:", ifpath.c_str());
+ ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityC.cmake");
+ mf->ReadListFile(0,ifpath.c_str());
}
- // **** Step 8, load backwards compatibility stuff for C and CXX
- // for old versions of CMake ListFiles C and CXX had some
- // backwards compatibility files they have to load
- const char* versionValue
- = mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
- if (atof(versionValue) <= 1.4)
+ if(strcmp(lang, "CXX") == 0)
{
- if(strcmp(lang, "C") == 0)
- {
- ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityC.cmake");
- mf->ReadListFile(0,ifpath.c_str());
- }
- if(strcmp(lang, "CXX") == 0)
- {
- ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityCXX.cmake");
- mf->ReadListFile(0,ifpath.c_str());
- }
-
+ ifpath = mf->GetModulesFile("CMakeBackwardCompatibilityCXX.cmake");
+ mf->ReadListFile(0,ifpath.c_str());
}
+
}
}
}
@@ -634,28 +626,6 @@ void cmGlobalGenerator::Generate()
m_CMakeInstance->UpdateProgress("Generating done", -1);
}
-void cmGlobalGenerator::LocalGenerate()
-{
- // for this case we create one LocalGenerator
- // configure it, and then Generate it
- // start with this directory
- cmLocalGenerator *lg = this->CreateLocalGenerator();
-
- // Setup relative path generation.
- this->ConfigureRelativePaths();
-
- // set the Start directories
- lg->GetMakefile()->SetStartDirectory(m_CMakeInstance->GetStartDirectory());
- lg->GetMakefile()->SetStartOutputDirectory(m_CMakeInstance->GetStartOutputDirectory());
- lg->GetMakefile()->MakeStartDirectoriesCurrent();
-
- // now do trhe configure
- lg->Configure();
- lg->ConfigureFinalPass();
- lg->Generate(false);
- delete lg;
-}
-
int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir,
const char *projectName,
const char *target,