ENH: cleanup by removing all the olf local generate junk that i not longer needed
This commit is contained in:
parent
a79868206e
commit
3ff6722934
|
@ -45,13 +45,6 @@ bool cmExportLibraryDependenciesCommand::InitialPass(std::vector<std::string> co
|
|||
|
||||
void cmExportLibraryDependenciesCommand::FinalPass()
|
||||
{
|
||||
// don't do anything if local mode
|
||||
if(m_Makefile->GetLocal())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Create a full path filename for output
|
||||
std::string fname = m_Args[0];
|
||||
bool append = false;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
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,8 +317,6 @@ 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 (!m_CMakeInstance->GetIsInTryCompile())
|
||||
|
@ -359,7 +352,6 @@ void cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char* lang)
|
||||
{
|
||||
|
@ -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,
|
||||
|
|
|
@ -60,13 +60,6 @@ public:
|
|||
*/
|
||||
virtual void Generate();
|
||||
|
||||
/**
|
||||
* Generate the required files for building this directory. This
|
||||
* basically creates a single LocalGenerators and
|
||||
* requests that it Generate.
|
||||
*/
|
||||
virtual void LocalGenerate();
|
||||
|
||||
/**
|
||||
* Set/Get and Clear the enabled languages.
|
||||
*/
|
||||
|
|
|
@ -717,11 +717,6 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
|
|||
cmCacheManager::INTERNAL);
|
||||
}
|
||||
|
||||
void cmGlobalVisualStudio7Generator::LocalGenerate()
|
||||
{
|
||||
this->cmGlobalGenerator::LocalGenerate();
|
||||
}
|
||||
|
||||
std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
|
||||
{
|
||||
return &m_Configurations;
|
||||
|
|
|
@ -66,13 +66,6 @@ public:
|
|||
*/
|
||||
virtual void Generate();
|
||||
|
||||
/**
|
||||
* Generate the required files for building this directory. This
|
||||
* basically creates a single LocalGenerators and
|
||||
* requests that it Generate.
|
||||
*/
|
||||
virtual void LocalGenerate();
|
||||
|
||||
/**
|
||||
* Generate the DSW workspace file.
|
||||
*/
|
||||
|
|
|
@ -2124,10 +2124,6 @@ cmCacheManager *cmMakefile::GetCacheManager() const
|
|||
return this->GetCMakeInstance()->GetCacheManager();
|
||||
}
|
||||
|
||||
bool cmMakefile::GetLocal() const
|
||||
{
|
||||
return this->GetCMakeInstance()->GetLocal();
|
||||
}
|
||||
void cmMakefile::DisplayStatus(const char* message, float s)
|
||||
{
|
||||
this->GetLocalGenerator()->GetGlobalGenerator()
|
||||
|
|
|
@ -610,9 +610,6 @@ public:
|
|||
cmVariableWatch* GetVariableWatch() const;
|
||||
#endif
|
||||
|
||||
//! Determine wether this is a local or global build.
|
||||
bool GetLocal() const;
|
||||
|
||||
///! Display progress or status message.
|
||||
void DisplayStatus(const char*, float);
|
||||
|
||||
|
|
|
@ -257,11 +257,6 @@ bool cmTryCompileCommand::InitialPass(std::vector<std::string> const& argv)
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( m_Makefile->GetLocal() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
cmTryCompileCommand::CoreTryCompileCode(m_Makefile,argv,true);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -26,11 +26,6 @@ bool cmTryRunCommand::InitialPass(std::vector<std::string> const& argv)
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( m_Makefile->GetLocal() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// build an arg list for TryCompile and extract the runArgs
|
||||
std::vector<std::string> tryCompile;
|
||||
std::string outputVariable;
|
||||
|
|
|
@ -115,7 +115,6 @@ cmake::cmake()
|
|||
cmSystemTools::PutEnv("MAKEFLAGS=");
|
||||
}
|
||||
|
||||
m_Local = false;
|
||||
m_Verbose = false;
|
||||
m_InTryCompile = false;
|
||||
m_CacheManager = new cmCacheManager;
|
||||
|
@ -275,7 +274,6 @@ void cmake::ReadListFile(const char *path)
|
|||
// Parse the args
|
||||
void cmake::SetArgs(const std::vector<std::string>& args)
|
||||
{
|
||||
m_Local = false;
|
||||
bool directoriesSet = false;
|
||||
for(unsigned int i=1; i < args.size(); ++i)
|
||||
{
|
||||
|
@ -363,12 +361,10 @@ void cmake::SetArgs(const std::vector<std::string>& args)
|
|||
this->SetStartDirectory
|
||||
(cmSystemTools::GetCurrentWorkingDirectory().c_str());
|
||||
}
|
||||
if (!m_Local)
|
||||
{
|
||||
|
||||
this->SetStartDirectory(this->GetHomeDirectory());
|
||||
this->SetStartOutputDirectory(this->GetHomeOutputDirectory());
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmake::SetDirectoriesFromFile(const char* arg)
|
||||
|
@ -1282,12 +1278,8 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|||
}
|
||||
|
||||
int ret = 0;
|
||||
// if not local or the cmake version has changed since the last run
|
||||
// of cmake, or CMakeSystem.cmake file is not in the root binary
|
||||
// directory, run a global generate
|
||||
if(m_ScriptMode || !m_Local || !this->CacheVersionMatches() ||
|
||||
!cmSystemTools::FileExists(systemFile.c_str()) )
|
||||
{
|
||||
|
||||
// now run the global generate
|
||||
// Check the state of the build system to see if we need to regenerate.
|
||||
if(!this->CheckBuildSystem())
|
||||
{
|
||||
|
@ -1300,8 +1292,6 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|||
std::string oldstartoutputdir = this->GetStartOutputDirectory();
|
||||
this->SetStartDirectory(this->GetHomeDirectory());
|
||||
this->SetStartOutputDirectory(this->GetHomeOutputDirectory());
|
||||
bool saveLocalFlag = m_Local;
|
||||
m_Local = false;
|
||||
ret = this->Configure();
|
||||
if (ret || m_ScriptMode)
|
||||
{
|
||||
|
@ -1315,16 +1305,9 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
|
|||
{
|
||||
return ret;
|
||||
}
|
||||
m_Local = saveLocalFlag;
|
||||
this->SetStartDirectory(oldstartdir.c_str());
|
||||
this->SetStartOutputDirectory(oldstartoutputdir.c_str());
|
||||
}
|
||||
|
||||
// if we are local do the local thing
|
||||
if (m_Local)
|
||||
{
|
||||
ret = this->LocalGenerate();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1342,36 +1325,6 @@ int cmake::Generate()
|
|||
return 0;
|
||||
}
|
||||
|
||||
int cmake::LocalGenerate()
|
||||
{
|
||||
// Read in the cache
|
||||
m_CacheManager->LoadCache(this->GetHomeOutputDirectory());
|
||||
|
||||
// create the generator based on the cache if it isn't already there
|
||||
const char* genName = m_CacheManager->GetCacheValue("CMAKE_GENERATOR");
|
||||
if(genName)
|
||||
{
|
||||
m_GlobalGenerator = this->CreateGlobalGenerator(genName);
|
||||
// set the global flag for unix style paths on cmSystemTools as
|
||||
// soon as the generator is set. This allows gmake to be used
|
||||
// on windows.
|
||||
cmSystemTools::SetForceUnixPaths(m_GlobalGenerator->GetForceUnixPaths());
|
||||
}
|
||||
else
|
||||
{
|
||||
cmSystemTools::Error("Could local Generate called without the GENERATOR being specified in the CMakeCache");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// do the local generate
|
||||
m_GlobalGenerator->LocalGenerate();
|
||||
if(cmSystemTools::GetErrorOccuredFlag())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned int cmake::GetMajorVersion()
|
||||
{
|
||||
return cmMakefile::GetMajorVersion();
|
||||
|
|
|
@ -204,12 +204,6 @@ class cmake
|
|||
/** Check if a command exists. */
|
||||
bool CommandExists(const char* name) const;
|
||||
|
||||
/**
|
||||
* Is cmake in the process of a local cmake invocation. If so, we know the
|
||||
* cache is already configured and ready to go.
|
||||
*/
|
||||
bool GetLocal() { return m_Local; }
|
||||
|
||||
///! Parse command line arguments
|
||||
void SetArgs(const std::vector<std::string>&);
|
||||
|
||||
|
@ -284,9 +278,6 @@ protected:
|
|||
///! read in a cmake list file to initialize the cache
|
||||
void ReadListFile(const char *path);
|
||||
|
||||
///! used by Run
|
||||
int LocalGenerate();
|
||||
|
||||
/**
|
||||
* Method called to check build system integrity at build time.
|
||||
* Returns 1 if CMake should rerun and 0 otherwise.
|
||||
|
@ -306,7 +297,6 @@ private:
|
|||
ProgressCallback m_ProgressCallback;
|
||||
void* m_ProgressCallbackClientData;
|
||||
bool m_Verbose;
|
||||
bool m_Local;
|
||||
bool m_InTryCompile;
|
||||
bool m_ScriptMode;
|
||||
std::string m_CMakeCommand;
|
||||
|
|
Loading…
Reference in New Issue