Merge topic 'clean-up-cmMakefile'

f2e07a6d cmMakefile: Remove unused PreOrder member.
aafe2821 cmMakefile: Remove unused Prefix member.
1fcf590b cmMakefile: Remove unused SubDirectoryOrder member.
c3a60cc9 cmMakefile: Remove AddExtraDirectory method.
37897347 cmMakefile: Remove unused method.
d7539ced cmMakefile: Remove bogus comment.
This commit is contained in:
Brad King 2015-04-02 12:57:41 -04:00 committed by CMake Topic Stage
commit 9780859b7e
5 changed files with 9 additions and 50 deletions

View File

@ -122,7 +122,7 @@ bool cmAddSubDirectoryCommand::InitialPass
// Add the subdirectory using the computed full paths. // Add the subdirectory using the computed full paths.
this->Makefile->AddSubDirectory(srcPath, binPath, this->Makefile->AddSubDirectory(srcPath, binPath,
excludeFromAll, false, true); excludeFromAll, true);
return true; return true;
} }

View File

@ -26,7 +26,6 @@ bool cmAuxSourceDirectoryCommand::InitialPass
std::string sourceListValue; std::string sourceListValue;
std::string templateDirectory = args[0]; std::string templateDirectory = args[0];
this->Makefile->AddExtraDirectory(templateDirectory.c_str());
std::string tdir; std::string tdir;
if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str())) if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str()))
{ {

View File

@ -101,7 +101,6 @@ cmMakefile::cmMakefile(): Internal(new Internals)
this->AddDefaultDefinitions(); this->AddDefaultDefinitions();
this->Initialize(); this->Initialize();
this->PreOrder = false;
this->GeneratingBuildSystem = false; this->GeneratingBuildSystem = false;
this->SuppressWatches = false; this->SuppressWatches = false;
@ -113,8 +112,6 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->Internal->VarInitStack.push(mf.Internal->VarInitStack.top()); this->Internal->VarInitStack.push(mf.Internal->VarInitStack.top());
this->Internal->VarUsageStack.push(mf.Internal->VarUsageStack.top()); this->Internal->VarUsageStack.push(mf.Internal->VarUsageStack.top());
this->Prefix = mf.Prefix;
this->AuxSourceDirectories = mf.AuxSourceDirectories;
this->cmStartDirectory = mf.cmStartDirectory; this->cmStartDirectory = mf.cmStartDirectory;
this->StartOutputDirectory = mf.StartOutputDirectory; this->StartOutputDirectory = mf.StartOutputDirectory;
this->cmHomeDirectory = mf.cmHomeDirectory; this->cmHomeDirectory = mf.cmHomeDirectory;
@ -145,9 +142,7 @@ cmMakefile::cmMakefile(const cmMakefile& mf): Internal(new Internals)
this->LocalGenerator = mf.LocalGenerator; this->LocalGenerator = mf.LocalGenerator;
this->FunctionBlockers = mf.FunctionBlockers; this->FunctionBlockers = mf.FunctionBlockers;
this->MacrosList = mf.MacrosList; this->MacrosList = mf.MacrosList;
this->SubDirectoryOrder = mf.SubDirectoryOrder;
this->Properties = mf.Properties; this->Properties = mf.Properties;
this->PreOrder = mf.PreOrder;
this->WarnUnused = mf.WarnUnused; this->WarnUnused = mf.WarnUnused;
this->Initialize(); this->Initialize();
this->CheckSystemVars = mf.CheckSystemVars; this->CheckSystemVars = mf.CheckSystemVars;
@ -1697,7 +1692,7 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
} }
void cmMakefile::AddSubDirectory(const std::string& sub, void cmMakefile::AddSubDirectory(const std::string& sub,
bool excludeFromAll, bool preorder) bool excludeFromAll)
{ {
// the source path must be made full if it isn't already // the source path must be made full if it isn't already
std::string srcPath = sub; std::string srcPath = sub;
@ -1719,13 +1714,13 @@ void cmMakefile::AddSubDirectory(const std::string& sub,
this->AddSubDirectory(srcPath, binPath, this->AddSubDirectory(srcPath, binPath,
excludeFromAll, preorder, false); excludeFromAll, false);
} }
void cmMakefile::AddSubDirectory(const std::string& srcPath, void cmMakefile::AddSubDirectory(const std::string& srcPath,
const std::string& binPath, const std::string& binPath,
bool excludeFromAll, bool preorder, bool excludeFromAll,
bool immediate) bool immediate)
{ {
// Make sure the binary directory is unique. // Make sure the binary directory is unique.
@ -1747,7 +1742,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
{ {
lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
} }
lg2->GetMakefile()->SetPreOrder(preorder);
if (immediate) if (immediate)
{ {
@ -2256,11 +2250,6 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
#endif #endif
void cmMakefile::AddExtraDirectory(const char* dir)
{
this->AuxSourceDirectories.push_back(dir);
}
static bool mightExpandVariablesCMP0019(const char* s) static bool mightExpandVariablesCMP0019(const char* s)
{ {
return s && *s && strstr(s,"${") && strchr(s,'}'); return s && *s && strstr(s,"${") && strchr(s,'}');

View File

@ -292,11 +292,10 @@ public:
/** /**
* Add a subdirectory to the build. * Add a subdirectory to the build.
*/ */
void AddSubDirectory(const std::string&, bool excludeFromAll=false, void AddSubDirectory(const std::string&, bool excludeFromAll=false);
bool preorder = false);
void AddSubDirectory(const std::string& fullSrcDir, void AddSubDirectory(const std::string& fullSrcDir,
const std::string& fullBinDir, const std::string& fullBinDir,
bool excludeFromAll, bool preorder, bool excludeFromAll,
bool immediate); bool immediate);
/** /**
@ -433,15 +432,6 @@ public:
bool HasCMP0054AlreadyBeenReported( bool HasCMP0054AlreadyBeenReported(
cmListFileContext context) const; cmListFileContext context) const;
/**
* Add an auxiliary directory to the build.
*/
void AddExtraDirectory(const char* dir);
/**
* Add an auxiliary directory to the build.
*/
void MakeStartDirectoriesCurrent() void MakeStartDirectoriesCurrent()
{ {
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
@ -620,12 +610,6 @@ public:
cmSourceFile* GetOrCreateSource(const std::string& sourceName, cmSourceFile* GetOrCreateSource(const std::string& sourceName,
bool generated = false); bool generated = false);
/**
* Obtain a list of auxiliary source directories.
*/
const std::vector<std::string>& GetAuxSourceDirectories() const
{return this->AuxSourceDirectories;}
//@{ //@{
/** /**
* Return a list of extensions associated with source and header * Return a list of extensions associated with source and header
@ -879,10 +863,6 @@ public:
///! Initialize a makefile from its parent ///! Initialize a makefile from its parent
void InitializeFromParent(); void InitializeFromParent();
///! Set/Get the preorder flag
void SetPreOrder(bool p) { this->PreOrder = p; }
bool GetPreOrder() const { return this->PreOrder; }
void AddInstallGenerator(cmInstallGenerator* g) void AddInstallGenerator(cmInstallGenerator* g)
{ if(g) this->InstallGenerators.push_back(g); } { if(g) this->InstallGenerators.push_back(g); }
std::vector<cmInstallGenerator*>& GetInstallGenerators() std::vector<cmInstallGenerator*>& GetInstallGenerators()
@ -976,9 +956,6 @@ protected:
// Check for a an unused variable // Check for a an unused variable
void CheckForUnused(const char* reason, const std::string& name) const; void CheckForUnused(const char* reason, const std::string& name) const;
std::string Prefix;
std::vector<std::string> AuxSourceDirectories; //
std::string cmStartDirectory; std::string cmStartDirectory;
std::string StartOutputDirectory; std::string StartOutputDirectory;
std::string cmHomeDirectory; std::string cmHomeDirectory;
@ -1067,8 +1044,6 @@ private:
std::vector<std::string> MacrosList; std::vector<std::string> MacrosList;
std::map<std::string, bool> SubDirectoryOrder;
mutable cmsys::RegularExpression cmDefineRegex; mutable cmsys::RegularExpression cmDefineRegex;
mutable cmsys::RegularExpression cmDefine01Regex; mutable cmsys::RegularExpression cmDefine01Regex;
mutable cmsys::RegularExpression cmAtVarRegex; mutable cmsys::RegularExpression cmAtVarRegex;
@ -1076,9 +1051,6 @@ private:
cmPropertyMap Properties; cmPropertyMap Properties;
// should this makefile be processed before or after processing the parent
bool PreOrder;
// Unused variable flags // Unused variable flags
bool WarnUnused; bool WarnUnused;
bool CheckSystemVars; bool CheckSystemVars;

View File

@ -22,7 +22,6 @@ bool cmSubdirCommand
} }
bool res = true; bool res = true;
bool excludeFromAll = false; bool excludeFromAll = false;
bool preorder = false;
for(std::vector<std::string>::const_iterator i = args.begin(); for(std::vector<std::string>::const_iterator i = args.begin();
i != args.end(); ++i) i != args.end(); ++i)
@ -34,7 +33,7 @@ bool cmSubdirCommand
} }
if(*i == "PREORDER") if(*i == "PREORDER")
{ {
preorder = true; // Ignored
continue; continue;
} }
@ -48,7 +47,7 @@ bool cmSubdirCommand
std::string(this->Makefile->GetCurrentOutputDirectory()) + std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + i->c_str(); "/" + i->c_str();
this->Makefile->AddSubDirectory(srcPath, binPath, this->Makefile->AddSubDirectory(srcPath, binPath,
excludeFromAll, preorder, false); excludeFromAll, false);
} }
// otherwise it is a full path // otherwise it is a full path
else if ( cmSystemTools::FileIsDirectory(*i) ) else if ( cmSystemTools::FileIsDirectory(*i) )
@ -59,7 +58,7 @@ bool cmSubdirCommand
std::string(this->Makefile->GetCurrentOutputDirectory()) + std::string(this->Makefile->GetCurrentOutputDirectory()) +
"/" + cmSystemTools::GetFilenameName(*i); "/" + cmSystemTools::GetFilenameName(*i);
this->Makefile->AddSubDirectory(*i, binPath, this->Makefile->AddSubDirectory(*i, binPath,
excludeFromAll, preorder, false); excludeFromAll, false);
} }
else else
{ {