Merge topic 'generate-time-generators'
2b9a25d7 cmGlobalGenerator: Create global targets directly after Configure. 3e08b4df cmMakefile: Skip Global targets for CMP0019 evaluation. 357bf469 cmGlobalGenerator: Fill the project map at compute time. ebf8d0a9 cmGlobalGenerator: Rename method. bd096d30 cmGlobalGenerator: Avoid cmLocalGenerator until after Configure. ff8ac8ee cmLocalGenerator: Create from already-constructed cmMakefile. 0bd7279f Ninja: Remove some incorrect comments adding no value. 2f2d4da9 cmCTestScriptHandler: Simplify deletes. 7fdc9a8b QtAutogen: Use a smart pointer. 92041eec cmGlobalGenerator: Remove MakeLocalGenerator method. acb00622 cmGlobalGenerator: Require a snapshot to create a local generator. 83b8a927 cmMakefile: Remove cmLocalGenerator member. 9b6a743b cmLocalGenerator: Remove Parent pointer.
This commit is contained in:
commit
352e8e95b6
@ -716,8 +716,10 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
cm.AddCMakePaths();
|
cm.AddCMakePaths();
|
||||||
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
|
cm.SetProgressCallback(cmCPackGeneratorProgress, this);
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(
|
||||||
cmMakefile *mf = lg->GetMakefile();
|
new cmMakefile(&gg, cm.GetCurrentSnapshot()));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lg(
|
||||||
|
gg.CreateLocalGenerator(mf.get()));
|
||||||
std::string realInstallDirectory = tempInstallDirectory;
|
std::string realInstallDirectory = tempInstallDirectory;
|
||||||
if ( !installSubDirectory.empty() && installSubDirectory != "/" )
|
if ( !installSubDirectory.empty() && installSubDirectory != "/" )
|
||||||
{
|
{
|
||||||
|
@ -202,8 +202,10 @@ int main (int argc, char const* const* argv)
|
|||||||
cminst.SetHomeOutputDirectory("");
|
cminst.SetHomeOutputDirectory("");
|
||||||
cminst.GetState()->RemoveUnscriptableCommands();
|
cminst.GetState()->RemoveUnscriptableCommands();
|
||||||
cmGlobalGenerator cmgg(&cminst);
|
cmGlobalGenerator cmgg(&cminst);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> globalMF(
|
||||||
cmMakefile* globalMF = cmlg->GetMakefile();
|
new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> cmlg(
|
||||||
|
cmgg.CreateLocalGenerator(globalMF.get()));
|
||||||
#if defined(__CYGWIN__)
|
#if defined(__CYGWIN__)
|
||||||
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
|
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
|
||||||
#endif
|
#endif
|
||||||
@ -357,8 +359,8 @@ int main (int argc, char const* const* argv)
|
|||||||
++it )
|
++it )
|
||||||
{
|
{
|
||||||
const char* gen = it->c_str();
|
const char* gen = it->c_str();
|
||||||
cmMakefile::ScopePushPop raii(globalMF);
|
cmMakefile::ScopePushPop raii(globalMF.get());
|
||||||
cmMakefile* mf = globalMF;
|
cmMakefile* mf = globalMF.get();
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
"Specified generator: " << gen << std::endl);
|
"Specified generator: " << gen << std::endl);
|
||||||
if ( parsed && !mf->GetDefinition("CPACK_PACKAGE_NAME") )
|
if ( parsed && !mf->GetDefinition("CPACK_PACKAGE_NAME") )
|
||||||
|
@ -738,8 +738,9 @@ void cmCTestLaunch::LoadConfig()
|
|||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
cm.SetHomeOutputDirectory("");
|
cm.SetHomeOutputDirectory("");
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
|
||||||
cmMakefile* mf = lg->GetMakefile();
|
cmsys::auto_ptr<cmLocalGenerator> lg(
|
||||||
|
gg.CreateLocalGenerator(mf.get()));
|
||||||
std::string fname = this->LogDir;
|
std::string fname = this->LogDir;
|
||||||
fname += "CTestLaunchConfig.cmake";
|
fname += "CTestLaunchConfig.cmake";
|
||||||
if(cmSystemTools::FileExists(fname.c_str()) &&
|
if(cmSystemTools::FileExists(fname.c_str()) &&
|
||||||
|
@ -125,42 +125,25 @@ void cmCTestScriptHandler::Initialize()
|
|||||||
// what time in seconds did this script start running
|
// what time in seconds did this script start running
|
||||||
this->ScriptStartTime = 0;
|
this->ScriptStartTime = 0;
|
||||||
|
|
||||||
|
delete this->Makefile;
|
||||||
this->Makefile = 0;
|
this->Makefile = 0;
|
||||||
if (this->LocalGenerator)
|
|
||||||
{
|
delete this->LocalGenerator;
|
||||||
delete this->LocalGenerator;
|
|
||||||
}
|
|
||||||
this->LocalGenerator = 0;
|
this->LocalGenerator = 0;
|
||||||
if (this->GlobalGenerator)
|
|
||||||
{
|
delete this->GlobalGenerator;
|
||||||
delete this->GlobalGenerator;
|
|
||||||
}
|
|
||||||
this->GlobalGenerator = 0;
|
this->GlobalGenerator = 0;
|
||||||
if (this->CMake)
|
|
||||||
{
|
delete this->CMake;
|
||||||
delete this->CMake;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
cmCTestScriptHandler::~cmCTestScriptHandler()
|
cmCTestScriptHandler::~cmCTestScriptHandler()
|
||||||
{
|
{
|
||||||
// local generator owns the makefile
|
delete this->Makefile;
|
||||||
this->Makefile = 0;
|
delete this->LocalGenerator;
|
||||||
if (this->LocalGenerator)
|
delete this->GlobalGenerator;
|
||||||
{
|
delete this->CMake;
|
||||||
delete this->LocalGenerator;
|
|
||||||
}
|
|
||||||
this->LocalGenerator = 0;
|
|
||||||
if (this->GlobalGenerator)
|
|
||||||
{
|
|
||||||
delete this->GlobalGenerator;
|
|
||||||
}
|
|
||||||
this->GlobalGenerator = 0;
|
|
||||||
if (this->CMake)
|
|
||||||
{
|
|
||||||
delete this->CMake;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -334,6 +317,7 @@ void cmCTestScriptHandler::CreateCMake()
|
|||||||
delete this->CMake;
|
delete this->CMake;
|
||||||
delete this->GlobalGenerator;
|
delete this->GlobalGenerator;
|
||||||
delete this->LocalGenerator;
|
delete this->LocalGenerator;
|
||||||
|
delete this->Makefile;
|
||||||
}
|
}
|
||||||
this->CMake = new cmake;
|
this->CMake = new cmake;
|
||||||
this->CMake->SetHomeDirectory("");
|
this->CMake->SetHomeDirectory("");
|
||||||
@ -341,8 +325,10 @@ void cmCTestScriptHandler::CreateCMake()
|
|||||||
this->CMake->AddCMakePaths();
|
this->CMake->AddCMakePaths();
|
||||||
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
|
this->GlobalGenerator = new cmGlobalGenerator(this->CMake);
|
||||||
|
|
||||||
this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator();
|
cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot();
|
||||||
this->Makefile = this->LocalGenerator->GetMakefile();
|
this->Makefile = new cmMakefile(this->GlobalGenerator, snapshot);
|
||||||
|
this->LocalGenerator =
|
||||||
|
this->GlobalGenerator->CreateLocalGenerator(this->Makefile);
|
||||||
|
|
||||||
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest);
|
||||||
|
|
||||||
|
@ -1592,8 +1592,9 @@ void cmCTestTestHandler::GetListOfTests()
|
|||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
cm.SetHomeOutputDirectory("");
|
cm.SetHomeOutputDirectory("");
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
|
||||||
cmMakefile *mf = lg->GetMakefile();
|
cmsys::auto_ptr<cmLocalGenerator> lg(
|
||||||
|
gg.CreateLocalGenerator(mf.get()));
|
||||||
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
|
mf->AddDefinition("CTEST_CONFIGURATION_TYPE",
|
||||||
this->CTest->GetConfigType().c_str());
|
this->CTest->GetConfigType().c_str());
|
||||||
|
|
||||||
|
@ -520,9 +520,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
cm.SetHomeOutputDirectory("");
|
cm.SetHomeOutputDirectory("");
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
|
||||||
cmMakefile *mf = lg->GetMakefile();
|
cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
|
||||||
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) )
|
if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(),
|
||||||
|
mf.get()) )
|
||||||
{
|
{
|
||||||
cmCTestOptionalLog(this, DEBUG,
|
cmCTestOptionalLog(this, DEBUG,
|
||||||
"Cannot find custom configuration file tree" << std::endl, quiet);
|
"Cannot find custom configuration file tree" << std::endl, quiet);
|
||||||
|
@ -44,10 +44,10 @@ void cmGlobalBorlandMakefileGenerator
|
|||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
|
cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator(
|
||||||
cmLocalGenerator* parent, cmState::Snapshot snapshot)
|
cmMakefile *mf)
|
||||||
{
|
{
|
||||||
cmLocalUnixMakefileGenerator3* lg =
|
cmLocalUnixMakefileGenerator3* lg =
|
||||||
new cmLocalUnixMakefileGenerator3(this, parent, snapshot);
|
new cmLocalUnixMakefileGenerator3(this, mf);
|
||||||
lg->SetMakefileVariableSize(32);
|
lg->SetMakefileVariableSize(32);
|
||||||
lg->SetMakeCommandEscapeTargetTwice(true);
|
lg->SetMakeCommandEscapeTargetTwice(true);
|
||||||
lg->SetBorlandMakeCurlyHack(true);
|
lg->SetBorlandMakeCurlyHack(true);
|
||||||
|
@ -36,8 +36,7 @@ public:
|
|||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
|
@ -1127,23 +1127,40 @@ void cmGlobalGenerator::Configure()
|
|||||||
this->FirstTimeProgress = 0.0f;
|
this->FirstTimeProgress = 0.0f;
|
||||||
this->ClearGeneratorMembers();
|
this->ClearGeneratorMembers();
|
||||||
|
|
||||||
// start with this directory
|
cmMakefile* dirMf =
|
||||||
cmLocalGenerator *lg = this->MakeLocalGenerator();
|
new cmMakefile(this, this->GetCMakeInstance()->GetCurrentSnapshot());
|
||||||
this->Makefiles.push_back(lg->GetMakefile());
|
this->Makefiles.push_back(dirMf);
|
||||||
|
cmLocalGenerator *lg = this->CreateLocalGenerator(dirMf);
|
||||||
this->LocalGenerators.push_back(lg);
|
this->LocalGenerators.push_back(lg);
|
||||||
|
|
||||||
// set the Start directories
|
// set the Start directories
|
||||||
lg->GetMakefile()->SetCurrentSourceDirectory
|
dirMf->SetCurrentSourceDirectory
|
||||||
(this->CMakeInstance->GetHomeDirectory());
|
(this->CMakeInstance->GetHomeDirectory());
|
||||||
lg->GetMakefile()->SetCurrentBinaryDirectory
|
dirMf->SetCurrentBinaryDirectory
|
||||||
(this->CMakeInstance->GetHomeOutputDirectory());
|
(this->CMakeInstance->GetHomeOutputDirectory());
|
||||||
|
|
||||||
this->BinaryDirectories.insert(
|
this->BinaryDirectories.insert(
|
||||||
this->CMakeInstance->GetHomeOutputDirectory());
|
this->CMakeInstance->GetHomeOutputDirectory());
|
||||||
|
|
||||||
// now do it
|
// now do it
|
||||||
lg->GetMakefile()->Configure();
|
dirMf->Configure();
|
||||||
lg->GetMakefile()->EnforceDirectoryLevelRules();
|
dirMf->EnforceDirectoryLevelRules();
|
||||||
|
|
||||||
|
// Put a copy of each global target in every directory.
|
||||||
|
cmTargets globalTargets;
|
||||||
|
this->CreateDefaultGlobalTargets(&globalTargets);
|
||||||
|
|
||||||
|
for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
|
||||||
|
{
|
||||||
|
cmMakefile* mf = this->Makefiles[i];
|
||||||
|
cmTargets* targets = &(mf->GetTargets());
|
||||||
|
cmTargets::iterator tit;
|
||||||
|
for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
|
||||||
|
{
|
||||||
|
(*targets)[tit->first] = tit->second;
|
||||||
|
(*targets)[tit->first].SetMakefile(mf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update the cache entry for the number of local generators, this is used
|
// update the cache entry for the number of local generators, this is used
|
||||||
// for progress
|
// for progress
|
||||||
@ -1155,11 +1172,7 @@ void cmGlobalGenerator::Configure()
|
|||||||
|
|
||||||
// check for link libraries and include directories containing "NOTFOUND"
|
// check for link libraries and include directories containing "NOTFOUND"
|
||||||
// and for infinite loops
|
// and for infinite loops
|
||||||
this->CheckLocalGenerators();
|
this->CheckTargetProperties();
|
||||||
|
|
||||||
// at this point this->LocalGenerators has been filled,
|
|
||||||
// so create the map from project name to vector of local generators
|
|
||||||
this->FillProjectMap();
|
|
||||||
|
|
||||||
if ( this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE)
|
if ( this->CMakeInstance->GetWorkingMode() == cmake::NORMAL_MODE)
|
||||||
{
|
{
|
||||||
@ -1186,25 +1199,6 @@ void cmGlobalGenerator::Configure()
|
|||||||
}
|
}
|
||||||
this->CMakeInstance->UpdateProgress(msg.str().c_str(), -1);
|
this->CMakeInstance->UpdateProgress(msg.str().c_str(), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
// Put a copy of each global target in every directory.
|
|
||||||
cmTargets globalTargets;
|
|
||||||
this->CreateDefaultGlobalTargets(&globalTargets);
|
|
||||||
|
|
||||||
for (i = 0; i < this->Makefiles.size(); ++i)
|
|
||||||
{
|
|
||||||
cmMakefile* mf = this->Makefiles[i];
|
|
||||||
cmTargets* targets = &(mf->GetTargets());
|
|
||||||
cmTargets::iterator tit;
|
|
||||||
for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
|
|
||||||
{
|
|
||||||
(*targets)[tit->first] = tit->second;
|
|
||||||
(*targets)[tit->first].SetMakefile(mf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
|
void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
|
||||||
@ -1267,6 +1261,10 @@ bool cmGlobalGenerator::Compute()
|
|||||||
|
|
||||||
this->CreateGenerationObjects();
|
this->CreateGenerationObjects();
|
||||||
|
|
||||||
|
// at this point this->LocalGenerators has been filled,
|
||||||
|
// so create the map from project name to vector of local generators
|
||||||
|
this->FillProjectMap();
|
||||||
|
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
// Iterate through all targets and set up automoc for those which have
|
// Iterate through all targets and set up automoc for those which have
|
||||||
// the AUTOMOC, AUTOUIC or AUTORCC property set
|
// the AUTOMOC, AUTOUIC or AUTORCC property set
|
||||||
@ -1600,6 +1598,7 @@ void cmGlobalGenerator::ClearGeneratorMembers()
|
|||||||
cmDeleteAll(this->BuildExportSets);
|
cmDeleteAll(this->BuildExportSets);
|
||||||
this->BuildExportSets.clear();
|
this->BuildExportSets.clear();
|
||||||
|
|
||||||
|
cmDeleteAll(this->Makefiles);
|
||||||
this->Makefiles.clear();
|
this->Makefiles.clear();
|
||||||
|
|
||||||
cmDeleteAll(this->LocalGenerators);
|
cmDeleteAll(this->LocalGenerators);
|
||||||
@ -1634,7 +1633,7 @@ void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGenerator::CheckLocalGenerators()
|
void cmGlobalGenerator::CheckTargetProperties()
|
||||||
{
|
{
|
||||||
std::map<std::string, std::string> notFoundMap;
|
std::map<std::string, std::string> notFoundMap;
|
||||||
// std::set<std::string> notFoundMap;
|
// std::set<std::string> notFoundMap;
|
||||||
@ -1985,23 +1984,10 @@ void cmGlobalGenerator::EnableInstallTarget()
|
|||||||
this->InstallTargetEnabled = true;
|
this->InstallTargetEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmLocalGenerator *
|
|
||||||
cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot,
|
|
||||||
cmLocalGenerator *parent)
|
|
||||||
{
|
|
||||||
if (!snapshot.IsValid())
|
|
||||||
{
|
|
||||||
snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this->CreateLocalGenerator(parent, snapshot);
|
|
||||||
}
|
|
||||||
|
|
||||||
cmLocalGenerator*
|
cmLocalGenerator*
|
||||||
cmGlobalGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmGlobalGenerator::CreateLocalGenerator(cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalGenerator(this, parent, snapshot);
|
return new cmLocalGenerator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
|
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,
|
||||||
|
@ -56,9 +56,8 @@ public:
|
|||||||
cmGlobalGenerator(cmake* cm);
|
cmGlobalGenerator(cmake* cm);
|
||||||
virtual ~cmGlobalGenerator();
|
virtual ~cmGlobalGenerator();
|
||||||
|
|
||||||
cmLocalGenerator* MakeLocalGenerator(
|
virtual cmLocalGenerator*
|
||||||
cmState::Snapshot snapshot = cmState::Snapshot(),
|
CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmLocalGenerator* parent = 0);
|
|
||||||
|
|
||||||
///! Get the name for this generator
|
///! Get the name for this generator
|
||||||
virtual std::string GetName() const { return "Generic"; }
|
virtual std::string GetName() const { return "Generic"; }
|
||||||
@ -395,7 +394,7 @@ protected:
|
|||||||
// Fill the ProjectMap, this must be called after LocalGenerators
|
// Fill the ProjectMap, this must be called after LocalGenerators
|
||||||
// has been populated.
|
// has been populated.
|
||||||
void FillProjectMap();
|
void FillProjectMap();
|
||||||
void CheckLocalGenerators();
|
void CheckTargetProperties();
|
||||||
bool IsExcluded(cmState::Snapshot const& root,
|
bool IsExcluded(cmState::Snapshot const& root,
|
||||||
cmState::Snapshot const& snp) const;
|
cmState::Snapshot const& snp) const;
|
||||||
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
|
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const;
|
||||||
@ -441,10 +440,6 @@ protected:
|
|||||||
virtual bool UseFolderProperty();
|
virtual bool UseFolderProperty();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///! Create a local generator appropriate to this Global Generator
|
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
cmMakefile* TryCompileOuterMakefile;
|
cmMakefile* TryCompileOuterMakefile;
|
||||||
// If you add a new map here, make sure it is copied
|
// If you add a new map here, make sure it is copied
|
||||||
// in EnableLanguagesFromGenerator
|
// in EnableLanguagesFromGenerator
|
||||||
|
@ -33,10 +33,9 @@ cmGlobalGhsMultiGenerator::~cmGlobalGhsMultiGenerator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmLocalGenerator *
|
cmLocalGenerator *
|
||||||
cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmGlobalGhsMultiGenerator::CreateLocalGenerator(cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalGhsMultiGenerator(this, parent, snapshot);
|
return new cmLocalGhsMultiGenerator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
|
void cmGlobalGhsMultiGenerator::GetDocumentation(cmDocumentationEntry &entry)
|
||||||
|
@ -31,8 +31,7 @@ public:
|
|||||||
{ return new cmGlobalGeneratorSimpleFactory<cmGlobalGhsMultiGenerator>(); }
|
{ return new cmGlobalGeneratorSimpleFactory<cmGlobalGhsMultiGenerator>(); }
|
||||||
|
|
||||||
///! create the correct local generator
|
///! create the correct local generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/// @return the name of this generator.
|
/// @return the name of this generator.
|
||||||
static std::string GetActualName() { return "Green Hills MULTI"; }
|
static std::string GetActualName() { return "Green Hills MULTI"; }
|
||||||
|
@ -528,10 +528,9 @@ cmGlobalNinjaGenerator::cmGlobalNinjaGenerator(cmake* cm)
|
|||||||
// Virtual public methods.
|
// Virtual public methods.
|
||||||
|
|
||||||
cmLocalGenerator*
|
cmLocalGenerator*
|
||||||
cmGlobalNinjaGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmGlobalNinjaGenerator::CreateLocalGenerator(cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalNinjaGenerator(this, parent, snapshot);
|
return new cmLocalNinjaGenerator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalNinjaGenerator
|
void cmGlobalNinjaGenerator
|
||||||
|
@ -162,33 +162,24 @@ public:
|
|||||||
public:
|
public:
|
||||||
cmGlobalNinjaGenerator(cmake* cm);
|
cmGlobalNinjaGenerator(cmake* cm);
|
||||||
|
|
||||||
/// Convenience method for creating an instance of this class.
|
|
||||||
static cmGlobalGeneratorFactory* NewFactory() {
|
static cmGlobalGeneratorFactory* NewFactory() {
|
||||||
return new cmGlobalGeneratorSimpleFactory<cmGlobalNinjaGenerator>(); }
|
return new cmGlobalGeneratorSimpleFactory<cmGlobalNinjaGenerator>(); }
|
||||||
|
|
||||||
/// Destructor.
|
|
||||||
virtual ~cmGlobalNinjaGenerator() { }
|
virtual ~cmGlobalNinjaGenerator() { }
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::CreateLocalGenerator()
|
virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf);
|
||||||
virtual cmLocalGenerator* CreateLocalGenerator(cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::GetName().
|
|
||||||
virtual std::string GetName() const {
|
virtual std::string GetName() const {
|
||||||
return cmGlobalNinjaGenerator::GetActualName(); }
|
return cmGlobalNinjaGenerator::GetActualName(); }
|
||||||
|
|
||||||
/// @return the name of this generator.
|
|
||||||
static std::string GetActualName() { return "Ninja"; }
|
static std::string GetActualName() { return "Ninja"; }
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
|
|
||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::EnableLanguage()
|
|
||||||
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
virtual void EnableLanguage(std::vector<std::string>const& languages,
|
||||||
cmMakefile* mf,
|
cmMakefile* mf,
|
||||||
bool optional);
|
bool optional);
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::GenerateBuildCommand()
|
|
||||||
virtual void GenerateBuildCommand(
|
virtual void GenerateBuildCommand(
|
||||||
std::vector<std::string>& makeCommand,
|
std::vector<std::string>& makeCommand,
|
||||||
const std::string& makeProgram,
|
const std::string& makeProgram,
|
||||||
@ -307,11 +298,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// Overloaded methods. @see cmGlobalGenerator::Generate()
|
|
||||||
virtual void Generate();
|
virtual void Generate();
|
||||||
|
|
||||||
/// Overloaded methods.
|
|
||||||
/// @see cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS()
|
|
||||||
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; }
|
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,11 +59,10 @@ void cmGlobalUnixMakefileGenerator3
|
|||||||
}
|
}
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *
|
cmLocalGenerator* cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(
|
||||||
cmGlobalUnixMakefileGenerator3::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalUnixMakefileGenerator3(this, parent, snapshot);
|
return new cmLocalUnixMakefileGenerator3(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@ -578,16 +577,20 @@ void cmGlobalUnixMakefileGenerator3
|
|||||||
makeOptions.begin(), makeOptions.end());
|
makeOptions.begin(), makeOptions.end());
|
||||||
if (!targetName.empty())
|
if (!targetName.empty())
|
||||||
{
|
{
|
||||||
|
cmMakefile* mf;
|
||||||
cmLocalUnixMakefileGenerator3 *lg;
|
cmLocalUnixMakefileGenerator3 *lg;
|
||||||
if (!this->LocalGenerators.empty())
|
if (!this->LocalGenerators.empty())
|
||||||
{
|
{
|
||||||
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
||||||
(this->LocalGenerators[0]);
|
(this->LocalGenerators[0]);
|
||||||
|
mf = lg->GetMakefile();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot();
|
||||||
|
mf = new cmMakefile(this, snapshot);
|
||||||
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
lg = static_cast<cmLocalUnixMakefileGenerator3 *>
|
||||||
(this->MakeLocalGenerator());
|
(this->CreateLocalGenerator(mf));
|
||||||
// set the Start directories
|
// set the Start directories
|
||||||
lg->GetMakefile()->SetCurrentSourceDirectory
|
lg->GetMakefile()->SetCurrentSourceDirectory
|
||||||
(this->CMakeInstance->GetHomeDirectory());
|
(this->CMakeInstance->GetHomeDirectory());
|
||||||
@ -606,6 +609,7 @@ void cmGlobalUnixMakefileGenerator3
|
|||||||
if (this->LocalGenerators.empty())
|
if (this->LocalGenerators.empty())
|
||||||
{
|
{
|
||||||
delete lg;
|
delete lg;
|
||||||
|
delete mf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,9 +67,7 @@ public:
|
|||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator3
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
|
@ -306,11 +306,10 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *
|
cmLocalGenerator* cmGlobalVisualStudio10Generator::CreateLocalGenerator(
|
||||||
cmGlobalVisualStudio10Generator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalVisualStudio10Generator(this, parent, snapshot);
|
return new cmLocalVisualStudio10Generator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -48,8 +48,7 @@ public:
|
|||||||
virtual bool Compute();
|
virtual bool Compute();
|
||||||
|
|
||||||
///! create the correct local generator
|
///! create the correct local generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
|
@ -173,10 +173,9 @@ cmGlobalVisualStudio6Generator::GenerateBuildCommand(
|
|||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *
|
cmLocalGenerator *
|
||||||
cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmGlobalVisualStudio6Generator::CreateLocalGenerator(cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalVisualStudio6Generator(this, parent, snapshot);
|
return new cmLocalVisualStudio6Generator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,8 +39,7 @@ public:
|
|||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
|
@ -279,12 +279,11 @@ void cmGlobalVisualStudio7Generator::GenerateBuildCommand(
|
|||||||
}
|
}
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *
|
cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator(
|
||||||
cmGlobalVisualStudio7Generator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
cmLocalVisualStudio7Generator *lg =
|
cmLocalVisualStudio7Generator *lg =
|
||||||
new cmLocalVisualStudio7Generator(this, parent, snapshot);
|
new cmLocalVisualStudio7Generator(this, mf);
|
||||||
return lg;
|
return lg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +43,7 @@ public:
|
|||||||
std::string const& GetPlatformName() const;
|
std::string const& GetPlatformName() const;
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual bool SetSystemName(std::string const& s, cmMakefile* mf);
|
virtual bool SetSystemName(std::string const& s, cmMakefile* mf);
|
||||||
|
|
||||||
|
@ -371,10 +371,9 @@ cmGlobalXCodeGenerator::GenerateBuildCommand(
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
cmLocalGenerator *
|
cmLocalGenerator *
|
||||||
cmGlobalXCodeGenerator::CreateLocalGenerator(cmLocalGenerator* parent,
|
cmGlobalXCodeGenerator::CreateLocalGenerator(cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
{
|
{
|
||||||
return new cmLocalXCodeGenerator(this, parent, snapshot);
|
return new cmLocalXCodeGenerator(this, mf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
@ -41,8 +41,7 @@ public:
|
|||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
///! Create a local generator appropriate to this Global Generator
|
///! Create a local generator appropriate to this Global Generator
|
||||||
virtual cmLocalGenerator *CreateLocalGenerator(cmLocalGenerator* parent,
|
virtual cmLocalGenerator *CreateLocalGenerator(cmMakefile *mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
|
@ -68,8 +68,9 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName,
|
|||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
cm.SetHomeOutputDirectory("");
|
cm.SetHomeOutputDirectory("");
|
||||||
cmGlobalGenerator ggi(&cm);
|
cmGlobalGenerator ggi(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(ggi.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(
|
||||||
cmMakefile *mf = lg->GetMakefile();
|
new cmMakefile(&ggi, cm.GetCurrentSnapshot()));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lg(ggi.CreateLocalGenerator(mf.get()));
|
||||||
|
|
||||||
const char* inFileName = settingsFileName;
|
const char* inFileName = settingsFileName;
|
||||||
|
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
|
|
||||||
cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
|
cmLocalCommonGenerator::cmLocalCommonGenerator(cmGlobalGenerator* gg,
|
||||||
cmLocalGenerator* parent,
|
cmMakefile* mf):
|
||||||
cmState::Snapshot snapshot):
|
cmLocalGenerator(gg, mf)
|
||||||
cmLocalGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,9 +22,7 @@ class cmCommonTargetGenerator;
|
|||||||
class cmLocalCommonGenerator: public cmLocalGenerator
|
class cmLocalCommonGenerator: public cmLocalGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalCommonGenerator(cmGlobalGenerator* gg,
|
cmLocalCommonGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
~cmLocalCommonGenerator();
|
~cmLocalCommonGenerator();
|
||||||
|
|
||||||
std::string const& GetConfigName() { return this->ConfigName; }
|
std::string const& GetConfigName() { return this->ConfigName; }
|
||||||
|
@ -43,15 +43,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
|
cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
|
||||||
cmLocalGenerator* parent,
|
cmMakefile* makefile)
|
||||||
cmState::Snapshot snapshot)
|
: cmOutputConverter(makefile->GetStateSnapshot()),
|
||||||
: cmOutputConverter(snapshot), StateSnapshot(snapshot)
|
StateSnapshot(makefile->GetStateSnapshot())
|
||||||
{
|
{
|
||||||
assert(snapshot.IsValid());
|
|
||||||
this->GlobalGenerator = gg;
|
this->GlobalGenerator = gg;
|
||||||
this->Parent = parent;
|
|
||||||
|
|
||||||
this->Makefile = new cmMakefile(this);
|
this->Makefile = makefile;
|
||||||
|
|
||||||
this->EmitUniversalBinaryFlags = true;
|
this->EmitUniversalBinaryFlags = true;
|
||||||
this->BackwardsCompatibility = 0;
|
this->BackwardsCompatibility = 0;
|
||||||
@ -60,7 +58,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
|
|||||||
|
|
||||||
cmLocalGenerator::~cmLocalGenerator()
|
cmLocalGenerator::~cmLocalGenerator()
|
||||||
{
|
{
|
||||||
delete this->Makefile;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmLocalGenerator::IssueMessage(cmake::MessageType t,
|
void cmLocalGenerator::IssueMessage(cmake::MessageType t,
|
||||||
|
@ -36,8 +36,7 @@ class cmCustomCommandGenerator;
|
|||||||
class cmLocalGenerator : public cmOutputConverter
|
class cmLocalGenerator : public cmOutputConverter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
|
cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
virtual ~cmLocalGenerator();
|
virtual ~cmLocalGenerator();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,9 +85,6 @@ public:
|
|||||||
cmState* GetState() const;
|
cmState* GetState() const;
|
||||||
cmState::Snapshot GetStateSnapshot() const;
|
cmState::Snapshot GetStateSnapshot() const;
|
||||||
|
|
||||||
///! set/get the parent generator
|
|
||||||
cmLocalGenerator* GetParent() const {return this->Parent;}
|
|
||||||
|
|
||||||
void AddArchitectureFlags(std::string& flags,
|
void AddArchitectureFlags(std::string& flags,
|
||||||
cmGeneratorTarget const* target,
|
cmGeneratorTarget const* target,
|
||||||
const std::string&lang, const std::string& config);
|
const std::string&lang, const std::string& config);
|
||||||
@ -343,7 +339,6 @@ protected:
|
|||||||
cmMakefile *Makefile;
|
cmMakefile *Makefile;
|
||||||
cmState::Snapshot StateSnapshot;
|
cmState::Snapshot StateSnapshot;
|
||||||
cmGlobalGenerator *GlobalGenerator;
|
cmGlobalGenerator *GlobalGenerator;
|
||||||
cmLocalGenerator* Parent;
|
|
||||||
std::map<std::string, std::string> UniqueObjectNamesMap;
|
std::map<std::string, std::string> UniqueObjectNamesMap;
|
||||||
std::string::size_type ObjectPathMax;
|
std::string::size_type ObjectPathMax;
|
||||||
std::set<std::string> ObjectMaxPathViolations;
|
std::set<std::string> ObjectMaxPathViolations;
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
#include "cmGeneratedFileStream.h"
|
#include "cmGeneratedFileStream.h"
|
||||||
|
|
||||||
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
|
cmLocalGhsMultiGenerator::cmLocalGhsMultiGenerator(cmGlobalGenerator* gg,
|
||||||
cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
: cmLocalGenerator(gg, mf)
|
||||||
: cmLocalGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ class cmGeneratedFileStream;
|
|||||||
class cmLocalGhsMultiGenerator : public cmLocalGenerator
|
class cmLocalGhsMultiGenerator : public cmLocalGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalGhsMultiGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
|
cmLocalGhsMultiGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual ~cmLocalGhsMultiGenerator();
|
virtual ~cmLocalGhsMultiGenerator();
|
||||||
|
|
||||||
|
@ -23,9 +23,8 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
|
cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg,
|
||||||
cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
: cmLocalCommonGenerator(gg, mf)
|
||||||
: cmLocalCommonGenerator(gg, parent, snapshot)
|
|
||||||
, HomeRelativeOutputPath("")
|
, HomeRelativeOutputPath("")
|
||||||
{
|
{
|
||||||
this->TargetImplib = "$TARGET_IMPLIB";
|
this->TargetImplib = "$TARGET_IMPLIB";
|
||||||
|
@ -31,8 +31,7 @@ class cmake;
|
|||||||
class cmLocalNinjaGenerator : public cmLocalCommonGenerator
|
class cmLocalNinjaGenerator : public cmLocalCommonGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
|
cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual ~cmLocalNinjaGenerator();
|
virtual ~cmLocalNinjaGenerator();
|
||||||
|
|
||||||
|
@ -80,9 +80,8 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalUnixMakefileGenerator3::
|
cmLocalUnixMakefileGenerator3::
|
||||||
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmLocalGenerator* parent,
|
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
: cmLocalCommonGenerator(gg, mf)
|
||||||
: cmLocalCommonGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
this->MakefileVariableSize = 0;
|
this->MakefileVariableSize = 0;
|
||||||
this->ColorMakefile = false;
|
this->ColorMakefile = false;
|
||||||
|
@ -34,9 +34,7 @@ class cmSourceFile;
|
|||||||
class cmLocalUnixMakefileGenerator3 : public cmLocalCommonGenerator
|
class cmLocalUnixMakefileGenerator3 : public cmLocalCommonGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg,
|
cmLocalUnixMakefileGenerator3(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
virtual ~cmLocalUnixMakefileGenerator3();
|
virtual ~cmLocalUnixMakefileGenerator3();
|
||||||
|
|
||||||
virtual void ComputeHomeRelativeOutputPath();
|
virtual void ComputeHomeRelativeOutputPath();
|
||||||
|
@ -62,10 +62,8 @@ class cmVS10XMLParser : public cmXMLParser
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudio10Generator
|
cmLocalVisualStudio10Generator
|
||||||
::cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
|
::cmLocalVisualStudio10Generator(cmGlobalGenerator* gg, cmMakefile* mf):
|
||||||
cmLocalGenerator* parent,
|
cmLocalVisualStudio7Generator(gg, mf)
|
||||||
cmState::Snapshot snapshot):
|
|
||||||
cmLocalVisualStudio7Generator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,9 +25,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalVisualStudio10Generator(cmGlobalGenerator* gg,
|
cmLocalVisualStudio10Generator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual ~cmLocalVisualStudio10Generator();
|
virtual ~cmLocalVisualStudio10Generator();
|
||||||
|
|
||||||
|
@ -24,10 +24,8 @@
|
|||||||
#include <cmsys/FStream.hxx>
|
#include <cmsys/FStream.hxx>
|
||||||
|
|
||||||
cmLocalVisualStudio6Generator
|
cmLocalVisualStudio6Generator
|
||||||
::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
|
::cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf):
|
||||||
cmLocalGenerator* parent,
|
cmLocalVisualStudioGenerator(gg, mf)
|
||||||
cmState::Snapshot snapshot):
|
|
||||||
cmLocalVisualStudioGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,7 @@ class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalVisualStudio6Generator(cmGlobalGenerator* gg,
|
cmLocalVisualStudio6Generator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual ~cmLocalVisualStudio6Generator();
|
virtual ~cmLocalVisualStudio6Generator();
|
||||||
|
|
||||||
|
@ -53,10 +53,8 @@ static void cmConvertToWindowsSlash(std::string& s)
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudio7Generator
|
cmLocalVisualStudio7Generator
|
||||||
::cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
|
::cmLocalVisualStudio7Generator(cmGlobalGenerator* gg, cmMakefile* mf):
|
||||||
cmLocalGenerator* parent,
|
cmLocalVisualStudioGenerator(gg, mf)
|
||||||
cmState::Snapshot snapshot):
|
|
||||||
cmLocalVisualStudioGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
|
this->Internal = new cmLocalVisualStudio7GeneratorInternals(this);
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalVisualStudio7Generator(cmGlobalGenerator* gg,
|
cmLocalVisualStudio7Generator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
|
|
||||||
virtual ~cmLocalVisualStudio7Generator();
|
virtual ~cmLocalVisualStudio7Generator();
|
||||||
|
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalVisualStudioGenerator
|
cmLocalVisualStudioGenerator
|
||||||
::cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
|
::cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf)
|
||||||
cmLocalGenerator* parent,
|
: cmLocalGenerator(gg, mf)
|
||||||
cmState::Snapshot snapshot)
|
|
||||||
: cmLocalGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ class cmCustomCommandGenerator;
|
|||||||
class cmLocalVisualStudioGenerator : public cmLocalGenerator
|
class cmLocalVisualStudioGenerator : public cmLocalGenerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmLocalVisualStudioGenerator(cmGlobalGenerator* gg,
|
cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
|
||||||
cmLocalGenerator* parent,
|
|
||||||
cmState::Snapshot snapshot);
|
|
||||||
virtual ~cmLocalVisualStudioGenerator();
|
virtual ~cmLocalVisualStudioGenerator();
|
||||||
|
|
||||||
/** Construct a script from the given list of command lines. */
|
/** Construct a script from the given list of command lines. */
|
||||||
|
@ -16,9 +16,8 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg,
|
cmLocalXCodeGenerator::cmLocalXCodeGenerator(cmGlobalGenerator* gg,
|
||||||
cmLocalGenerator* parent,
|
cmMakefile* mf)
|
||||||
cmState::Snapshot snapshot)
|
: cmLocalGenerator(gg, mf)
|
||||||
: cmLocalGenerator(gg, parent, snapshot)
|
|
||||||
{
|
{
|
||||||
// the global generator does this, so do not
|
// the global generator does this, so do not
|
||||||
// put these flags into the language flags
|
// put these flags into the language flags
|
||||||
|
@ -24,8 +24,8 @@ class cmLocalXCodeGenerator : public cmLocalGenerator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///! Set cache only and recurse to false by default.
|
///! Set cache only and recurse to false by default.
|
||||||
cmLocalXCodeGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent,
|
cmLocalXCodeGenerator(cmGlobalGenerator* gg,
|
||||||
cmState::Snapshot snapshot);
|
cmMakefile* mf);
|
||||||
|
|
||||||
virtual ~cmLocalXCodeGenerator();
|
virtual ~cmLocalXCodeGenerator();
|
||||||
virtual std::string GetTargetDirectory(cmTarget const& target) const;
|
virtual std::string GetTargetDirectory(cmTarget const& target) const;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "cmSourceFileLocation.h"
|
#include "cmSourceFileLocation.h"
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
#include "cmGlobalGenerator.h"
|
#include "cmGlobalGenerator.h"
|
||||||
#include "cmLocalGenerator.h"
|
|
||||||
#include "cmCommands.h"
|
#include "cmCommands.h"
|
||||||
#include "cmState.h"
|
#include "cmState.h"
|
||||||
#include "cmOutputConverter.h"
|
#include "cmOutputConverter.h"
|
||||||
@ -44,9 +43,10 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
// default is not to be building executables
|
// default is not to be building executables
|
||||||
cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
|
cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
|
||||||
: LocalGenerator(localGenerator),
|
cmState::Snapshot const& snapshot)
|
||||||
StateSnapshot(localGenerator->GetStateSnapshot())
|
: GlobalGenerator(globalGenerator),
|
||||||
|
StateSnapshot(snapshot)
|
||||||
{
|
{
|
||||||
this->IsSourceFileTryCompile = false;
|
this->IsSourceFileTryCompile = false;
|
||||||
|
|
||||||
@ -1753,14 +1753,14 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
|
|||||||
this->ContextStack.back()->Name,
|
this->ContextStack.back()->Name,
|
||||||
this->ContextStack.back()->Line);
|
this->ContextStack.back()->Line);
|
||||||
|
|
||||||
|
cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot);
|
||||||
|
this->GetGlobalGenerator()->AddMakefile(subMf);
|
||||||
|
|
||||||
// create a new local generator and set its parent
|
// create a new local generator and set its parent
|
||||||
cmLocalGenerator *lg2 = this->GetGlobalGenerator()
|
cmLocalGenerator *lg2 = this->GetGlobalGenerator()
|
||||||
->MakeLocalGenerator(newSnapshot, this->LocalGenerator);
|
->CreateLocalGenerator(subMf);
|
||||||
this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile());
|
|
||||||
this->GetGlobalGenerator()->AddLocalGenerator(lg2);
|
this->GetGlobalGenerator()->AddLocalGenerator(lg2);
|
||||||
|
|
||||||
cmMakefile* subMf = lg2->GetMakefile();
|
|
||||||
|
|
||||||
// set the subdirs start dirs
|
// set the subdirs start dirs
|
||||||
subMf->SetCurrentSourceDirectory(srcPath);
|
subMf->SetCurrentSourceDirectory(srcPath);
|
||||||
subMf->SetCurrentBinaryDirectory(binPath);
|
subMf->SetCurrentBinaryDirectory(binPath);
|
||||||
@ -2334,7 +2334,8 @@ void cmMakefile::ExpandVariablesCMP0019()
|
|||||||
l != this->Targets.end(); ++l)
|
l != this->Targets.end(); ++l)
|
||||||
{
|
{
|
||||||
cmTarget &t = l->second;
|
cmTarget &t = l->second;
|
||||||
if (t.GetType() == cmTarget::INTERFACE_LIBRARY)
|
if (t.GetType() == cmTarget::INTERFACE_LIBRARY
|
||||||
|
|| t.GetType() == cmTarget::GLOBAL_TARGET)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -3744,12 +3745,12 @@ bool cmMakefile::GetIsSourceFileTryCompile() const
|
|||||||
|
|
||||||
cmake *cmMakefile::GetCMakeInstance() const
|
cmake *cmMakefile::GetCMakeInstance() const
|
||||||
{
|
{
|
||||||
return this->GetGlobalGenerator()->GetCMakeInstance();
|
return this->GlobalGenerator->GetCMakeInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
|
cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
|
||||||
{
|
{
|
||||||
return this->LocalGenerator->GetGlobalGenerator();
|
return this->GlobalGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CMAKE_BUILD_WITH_CMAKE
|
#ifdef CMAKE_BUILD_WITH_CMAKE
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
class cmFunctionBlocker;
|
class cmFunctionBlocker;
|
||||||
class cmCommand;
|
class cmCommand;
|
||||||
class cmInstallGenerator;
|
class cmInstallGenerator;
|
||||||
class cmLocalGenerator;
|
|
||||||
class cmMakeDepend;
|
class cmMakeDepend;
|
||||||
class cmSourceFile;
|
class cmSourceFile;
|
||||||
class cmTest;
|
class cmTest;
|
||||||
@ -71,7 +70,8 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Construct an empty makefile.
|
* Construct an empty makefile.
|
||||||
*/
|
*/
|
||||||
cmMakefile(cmLocalGenerator* localGenerator);
|
cmMakefile(cmGlobalGenerator* globalGenerator,
|
||||||
|
const cmState::Snapshot& snapshot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
@ -856,7 +856,7 @@ protected:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<cmCommand*> FinalPassCommands;
|
std::vector<cmCommand*> FinalPassCommands;
|
||||||
cmLocalGenerator* LocalGenerator;
|
cmGlobalGenerator* GlobalGenerator;
|
||||||
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
bool IsFunctionBlocked(const cmListFileFunction& lff,
|
||||||
cmExecutionStatus &status);
|
cmExecutionStatus &status);
|
||||||
|
|
||||||
|
@ -1217,7 +1217,9 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
|
|||||||
cm.SetHomeDirectory(targetDirectory);
|
cm.SetHomeDirectory(targetDirectory);
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
|
|
||||||
cmLocalGenerator* lg = gg.MakeLocalGenerator();
|
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
||||||
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, snapshot));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
|
||||||
lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
|
lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory);
|
||||||
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
|
lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory);
|
||||||
gg.SetCurrentMakefile(lg->GetMakefile());
|
gg.SetCurrentMakefile(lg->GetMakefile());
|
||||||
@ -1234,7 +1236,6 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory,
|
|||||||
|
|
||||||
this->WriteOldMocDefinitionsFile(targetDirectory);
|
this->WriteOldMocDefinitionsFile(targetDirectory);
|
||||||
|
|
||||||
delete lg;
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +429,9 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
|
|||||||
std::string homeOutputDir = this->GetHomeOutputDirectory();
|
std::string homeOutputDir = this->GetHomeOutputDirectory();
|
||||||
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
|
cmState::Snapshot snapshot = this->GetCurrentSnapshot();
|
||||||
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get()));
|
||||||
lg->GetMakefile()->SetCurrentBinaryDirectory
|
lg->GetMakefile()->SetCurrentBinaryDirectory
|
||||||
(cmSystemTools::GetCurrentWorkingDirectory());
|
(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
lg->GetMakefile()->SetCurrentSourceDirectory
|
lg->GetMakefile()->SetCurrentSourceDirectory
|
||||||
@ -469,9 +471,10 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
|
|||||||
cmGlobalGenerator *gg = new cmGlobalGenerator(this);
|
cmGlobalGenerator *gg = new cmGlobalGenerator(this);
|
||||||
this->SetGlobalGenerator(gg);
|
this->SetGlobalGenerator(gg);
|
||||||
|
|
||||||
|
cmState::Snapshot snapshot = this->GetCurrentSnapshot();
|
||||||
// read in the list file to fill the cache
|
// read in the list file to fill the cache
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot));
|
||||||
cmMakefile* mf = lg->GetMakefile();
|
cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get()));
|
||||||
mf->SetCurrentBinaryDirectory
|
mf->SetCurrentBinaryDirectory
|
||||||
(cmSystemTools::GetCurrentWorkingDirectory());
|
(cmSystemTools::GetCurrentWorkingDirectory());
|
||||||
mf->SetCurrentSourceDirectory
|
mf->SetCurrentSourceDirectory
|
||||||
@ -2059,8 +2062,8 @@ int cmake::CheckBuildSystem()
|
|||||||
cm.SetHomeDirectory("");
|
cm.SetHomeDirectory("");
|
||||||
cm.SetHomeOutputDirectory("");
|
cm.SetHomeOutputDirectory("");
|
||||||
cmGlobalGenerator gg(&cm);
|
cmGlobalGenerator gg(&cm);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot()));
|
||||||
cmMakefile* mf = lg->GetMakefile();
|
cmsys::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator(mf.get()));
|
||||||
if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
|
if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag())
|
cmSystemTools::GetErrorOccuredFlag())
|
||||||
{
|
{
|
||||||
@ -2089,8 +2092,11 @@ int cmake::CheckBuildSystem()
|
|||||||
ggd(this->CreateGlobalGenerator(genName));
|
ggd(this->CreateGlobalGenerator(genName));
|
||||||
if(ggd.get())
|
if(ggd.get())
|
||||||
{
|
{
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
|
cmsys::auto_ptr<cmMakefile> mfd(new cmMakefile(ggd.get(),
|
||||||
lgd->ClearDependencies(mf, verbose);
|
cm.GetCurrentSnapshot()));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lgd(
|
||||||
|
ggd->CreateLocalGenerator(mfd.get()));
|
||||||
|
lgd->ClearDependencies(mfd.get(), verbose);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -768,7 +768,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
|
|||||||
if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen))
|
if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen))
|
||||||
{
|
{
|
||||||
cm.SetGlobalGenerator(ggd);
|
cm.SetGlobalGenerator(ggd);
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator());
|
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
||||||
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(ggd, snapshot));
|
||||||
|
cmsys::auto_ptr<cmLocalGenerator> lgd(
|
||||||
|
ggd->CreateLocalGenerator(mf.get()));
|
||||||
lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
|
lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
|
||||||
lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
|
lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user