Merge topic 'minor_cleanups'
19012b46
cmMakefile: Fix style.10e6f1e7
cmMakefile: Fix typo in comment.c3a2f78b
Makefiles: Remove duplicate code.2e0611f9
cmGeneratorExpression: Remove unused include.d83ef53a
Rename local 'dir_max' variables to 'dir'
This commit is contained in:
commit
9c609db988
|
@ -16,8 +16,6 @@
|
|||
#include "cmStandardIncludes.h"
|
||||
#include "cmListFileCache.h"
|
||||
|
||||
#include <stack>
|
||||
|
||||
#include <cmsys/RegularExpression.hxx>
|
||||
#include <cmsys/auto_ptr.hxx>
|
||||
|
||||
|
|
|
@ -639,12 +639,12 @@ void cmGlobalNinjaGenerator
|
|||
cmTarget* target = gt->Target;
|
||||
|
||||
// Compute full path to object file directory for this target.
|
||||
std::string dir_max;
|
||||
dir_max += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir_max += "/";
|
||||
dir_max += gt->LocalGenerator->GetTargetDirectory(*target);
|
||||
dir_max += "/";
|
||||
gt->ObjectDirectory = dir_max;
|
||||
std::string dir;
|
||||
dir += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir += "/";
|
||||
dir += gt->LocalGenerator->GetTargetDirectory(*target);
|
||||
dir += "/";
|
||||
gt->ObjectDirectory = dir;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -111,12 +111,12 @@ cmGlobalUnixMakefileGenerator3
|
|||
cmTarget* target = gt->Target;
|
||||
|
||||
// Compute full path to object file directory for this target.
|
||||
std::string dir_max;
|
||||
dir_max += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir_max += "/";
|
||||
dir_max += gt->LocalGenerator->GetTargetDirectory(*target);
|
||||
dir_max += "/";
|
||||
gt->ObjectDirectory = dir_max;
|
||||
std::string dir;
|
||||
dir += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir += "/";
|
||||
dir += gt->LocalGenerator->GetTargetDirectory(*target);
|
||||
dir += "/";
|
||||
gt->ObjectDirectory = dir;
|
||||
}
|
||||
|
||||
void cmGlobalUnixMakefileGenerator3::Configure()
|
||||
|
@ -957,21 +957,6 @@ cmGlobalUnixMakefileGenerator3::RecordTargetProgress(
|
|||
tp.VariableFile = tg->GetProgressFileNameFull();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
cmGlobalUnixMakefileGenerator3::ProgressMapCompare
|
||||
::operator()(cmTarget const* l, cmTarget const* r) const
|
||||
{
|
||||
// Order by target name.
|
||||
if(int c = strcmp(l->GetName().c_str(), r->GetName().c_str()))
|
||||
{
|
||||
return c < 0;
|
||||
}
|
||||
// Order duplicate targets by binary directory.
|
||||
return strcmp(l->GetMakefile()->GetCurrentOutputDirectory(),
|
||||
r->GetMakefile()->GetCurrentOutputDirectory()) < 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
cmGlobalUnixMakefileGenerator3::TargetProgress
|
||||
|
|
|
@ -185,10 +185,8 @@ protected:
|
|||
std::vector<unsigned long> Marks;
|
||||
void WriteProgressVariables(unsigned long total, unsigned long& current);
|
||||
};
|
||||
struct ProgressMapCompare { bool operator()(cmTarget const*,
|
||||
cmTarget const*) const; };
|
||||
typedef std::map<cmTarget const*, TargetProgress,
|
||||
ProgressMapCompare> ProgressMapType;
|
||||
cmStrictTargetComparison> ProgressMapType;
|
||||
ProgressMapType ProgressMap;
|
||||
|
||||
size_t CountProgressMarksInTarget(cmTarget const* target,
|
||||
|
|
|
@ -202,11 +202,11 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
|
|||
std::vector<cmSourceFile const*> objectSources;
|
||||
gt->GetObjectSources(objectSources);
|
||||
// Compute full path to object file directory for this target.
|
||||
std::string dir_max;
|
||||
dir_max += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir_max += "/";
|
||||
dir_max += this->GetTargetDirectory(*gt->Target);
|
||||
dir_max += "/";
|
||||
std::string dir;
|
||||
dir += gt->Makefile->GetCurrentOutputDirectory();
|
||||
dir += "/";
|
||||
dir += this->GetTargetDirectory(*gt->Target);
|
||||
dir += "/";
|
||||
// Compute the name of each object file.
|
||||
for(std::vector<cmSourceFile const*>::iterator
|
||||
si = objectSources.begin();
|
||||
|
@ -215,7 +215,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
|
|||
cmSourceFile const* sf = *si;
|
||||
bool hasSourceExtension = true;
|
||||
std::string objectName = this->GetObjectFileNameWithoutTarget(*sf,
|
||||
dir_max,
|
||||
dir,
|
||||
&hasSourceExtension);
|
||||
if(cmSystemTools::FileIsFullPath(objectName.c_str()))
|
||||
{
|
||||
|
|
|
@ -2079,7 +2079,7 @@ cmMakefile::LinearGetSourceFileWithOutput(const std::string& name) const
|
|||
// does this source file have a custom command?
|
||||
if ((*i)->GetCustomCommand())
|
||||
{
|
||||
// is the output of the custom command match the source files name
|
||||
// Does the output of the custom command match the source file name?
|
||||
const std::vector<std::string>& outputs =
|
||||
(*i)->GetCustomCommand()->GetOutputs();
|
||||
for(std::vector<std::string>::const_iterator o = outputs.begin();
|
||||
|
@ -2109,7 +2109,7 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(
|
|||
// linear-time search for an output with a matching suffix.
|
||||
if(!cmSystemTools::FileIsFullPath(name.c_str()))
|
||||
{
|
||||
return LinearGetSourceFileWithOutput(name);
|
||||
return this->LinearGetSourceFileWithOutput(name);
|
||||
}
|
||||
// Otherwise we use an efficient lookup map.
|
||||
OutputToSourceMap::const_iterator o = this->OutputToSource.find(name);
|
||||
|
|
Loading…
Reference in New Issue