Merge Configure state with GeneratingBuildSystem state.

This commit is contained in:
Stephen Kelly 2015-05-30 19:26:32 +02:00 committed by Brad King
parent 363caa2fa5
commit 27e11c6fea
6 changed files with 14 additions and 24 deletions

View File

@ -1280,7 +1280,6 @@ void cmGlobalGenerator::Generate()
// Generate project files // Generate project files
for (i = 0; i < this->LocalGenerators.size(); ++i) for (i = 0; i < this->LocalGenerators.size(); ++i)
{ {
this->LocalGenerators[i]->GetMakefile()->SetGeneratingBuildSystem();
this->SetCurrentLocalGenerator(this->LocalGenerators[i]); this->SetCurrentLocalGenerator(this->LocalGenerators[i]);
this->LocalGenerators[i]->Generate(); this->LocalGenerators[i]->Generate();
if(!this->LocalGenerators[i]->GetMakefile()->IsOn( if(!this->LocalGenerators[i]->GetMakefile()->IsOn(

View File

@ -59,7 +59,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
this->Makefile = new cmMakefile(this); this->Makefile = new cmMakefile(this);
this->LinkScriptShell = false; this->LinkScriptShell = false;
this->Configured = false;
this->EmitUniversalBinaryFlags = true; this->EmitUniversalBinaryFlags = true;
this->BackwardsCompatibility = 0; this->BackwardsCompatibility = 0;
this->BackwardsCompatibilityFinal = false; this->BackwardsCompatibilityFinal = false;
@ -128,7 +127,7 @@ void cmLocalGenerator::Configure()
std::vector<cmLocalGenerator *>::iterator sdi = subdirs.begin(); std::vector<cmLocalGenerator *>::iterator sdi = subdirs.begin();
for (; sdi != subdirs.end(); ++sdi) for (; sdi != subdirs.end(); ++sdi)
{ {
if (!(*sdi)->Configured) if (!(*sdi)->GetMakefile()->IsConfigured())
{ {
this->Makefile->ConfigureSubDirectory(*sdi); this->Makefile->ConfigureSubDirectory(*sdi);
} }
@ -138,7 +137,7 @@ void cmLocalGenerator::Configure()
this->ComputeObjectMaxPath(); this->ComputeObjectMaxPath();
this->Configured = true; this->Makefile->SetConfigured();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -3179,11 +3178,6 @@ bool cmLocalGenerator::IsNMake() const
return this->GetState()->UseNMake(); return this->GetState()->UseNMake();
} }
void cmLocalGenerator::SetConfiguredCMP0014(bool configured)
{
this->Configured = configured;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
std::string std::string
cmLocalGenerator cmLocalGenerator
@ -3465,7 +3459,7 @@ cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
} }
} }
this->BackwardsCompatibility = CMake_VERSION_ENCODE(major, minor, patch); this->BackwardsCompatibility = CMake_VERSION_ENCODE(major, minor, patch);
this->BackwardsCompatibilityFinal = this->Configured; this->BackwardsCompatibilityFinal = this->Makefile->IsConfigured();
} }
return this->BackwardsCompatibility; return this->BackwardsCompatibility;

View File

@ -383,8 +383,6 @@ public:
bool IsMinGWMake() const; bool IsMinGWMake() const;
bool IsNMake() const; bool IsNMake() const;
void SetConfiguredCMP0014(bool configured);
protected: protected:
///! put all the libraries for a target on into the given stream ///! put all the libraries for a target on into the given stream
void OutputLinkLibraries(std::string& linkLibraries, void OutputLinkLibraries(std::string& linkLibraries,
@ -451,7 +449,6 @@ protected:
std::set<cmTarget const*> WarnCMP0063; std::set<cmTarget const*> WarnCMP0063;
bool LinkScriptShell; bool LinkScriptShell;
bool Configured;
bool EmitUniversalBinaryFlags; bool EmitUniversalBinaryFlags;
// Hack for ExpandRuleVariable until object-oriented version is // Hack for ExpandRuleVariable until object-oriented version is

View File

@ -146,7 +146,7 @@ cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused(); this->WarnUnused = this->GetCMakeInstance()->GetWarnUnused();
this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars(); this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
this->GeneratingBuildSystem = false; this->Configured = false;
this->SuppressWatches = false; this->SuppressWatches = false;
// Setup the default include file regular expression (match everything). // Setup the default include file regular expression (match everything).
@ -1594,7 +1594,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
// NEW behavior prints the error. // NEW behavior prints the error.
this->IssueMessage(cmake::FATAL_ERROR, e.str()); this->IssueMessage(cmake::FATAL_ERROR, e.str());
} }
lg2->SetConfiguredCMP0014(true); lg2->GetMakefile()->SetConfigured();
return; return;
} }
// finally configure the subdir // finally configure the subdir

View File

@ -781,8 +781,8 @@ public:
return this->CompileDefinitionsEntries; return this->CompileDefinitionsEntries;
} }
bool IsGeneratingBuildSystem() const { return this->GeneratingBuildSystem; } bool IsConfigured() const { return this->Configured; }
void SetGeneratingBuildSystem(){ this->GeneratingBuildSystem = true; } void SetConfigured(){ this->Configured = true; }
void AddQtUiFileWithOptions(cmSourceFile *sf); void AddQtUiFileWithOptions(cmSourceFile *sf);
std::vector<cmSourceFile*> GetQtUiFilesWithOptions() const; std::vector<cmSourceFile*> GetQtUiFilesWithOptions() const;
@ -994,7 +994,7 @@ private:
long line, long line,
bool removeEmpty, bool removeEmpty,
bool replaceAt) const; bool replaceAt) const;
bool GeneratingBuildSystem; bool Configured;
/** /**
* Old version of GetSourceFileWithOutput(const std::string&) kept for * Old version of GetSourceFileWithOutput(const std::string&) kept for
* backward-compatibility. It implements a linear search and support * backward-compatibility. It implements a linear search and support

View File

@ -764,7 +764,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
"SOURCES") "SOURCES")
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugSourcesDone = true; this->DebugSourcesDone = true;
} }
@ -2106,7 +2106,7 @@ cmTarget::GetIncludeDirectories(const std::string& config,
"INCLUDE_DIRECTORIES") "INCLUDE_DIRECTORIES")
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugIncludesDone = true; this->DebugIncludesDone = true;
} }
@ -2277,7 +2277,7 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
"COMPILE_OPTIONS") "COMPILE_OPTIONS")
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugCompileOptionsDone = true; this->DebugCompileOptionsDone = true;
} }
@ -2348,7 +2348,7 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
"COMPILE_DEFINITIONS") "COMPILE_DEFINITIONS")
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugCompileDefinitionsDone = true; this->DebugCompileDefinitionsDone = true;
} }
@ -2449,7 +2449,7 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result,
"COMPILE_FEATURES") "COMPILE_FEATURES")
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugCompileFeaturesDone = true; this->DebugCompileFeaturesDone = true;
} }
@ -4857,7 +4857,7 @@ cmTarget::ReportPropertyOrigin(const std::string &p,
p) p)
!= debugProperties.end(); != debugProperties.end();
if (this->Makefile->IsGeneratingBuildSystem()) if (this->Makefile->IsConfigured())
{ {
this->DebugCompatiblePropertiesDone[p] = true; this->DebugCompatiblePropertiesDone[p] = true;
} }