cmGlobalGenerator: Move GeneratorTargetsType to usage site.

This commit is contained in:
Stephen Kelly 2015-10-21 19:48:47 +02:00
parent a8c0fbcc19
commit c2c239e607
5 changed files with 20 additions and 20 deletions

View File

@ -3607,18 +3607,6 @@ std::string cmGeneratorTarget::GetPDBName(const std::string& config) const
return prefix+base+".pdb";
}
bool cmStrictTargetComparison::operator()(cmTarget const* t1,
cmTarget const* t2) const
{
int nameResult = strcmp(t1->GetName().c_str(), t2->GetName().c_str());
if (nameResult == 0)
{
return strcmp(t1->GetMakefile()->GetCurrentBinaryDirectory(),
t2->GetMakefile()->GetCurrentBinaryDirectory()) < 0;
}
return nameResult < 0;
}
//----------------------------------------------------------------------------
struct cmGeneratorTarget::SourceFileFlags
cmGeneratorTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const

View File

@ -675,12 +675,4 @@ public:
}
};
struct cmStrictTargetComparison {
bool operator()(cmTarget const* t1, cmTarget const* t2) const;
};
typedef std::map<cmTarget const*,
cmGeneratorTarget*,
cmStrictTargetComparison> cmGeneratorTargetsType;
#endif

View File

@ -48,6 +48,18 @@
#include <assert.h>
bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1,
cmTarget const* t2) const
{
int nameResult = strcmp(t1->GetName().c_str(), t2->GetName().c_str());
if (nameResult == 0)
{
return strcmp(t1->GetMakefile()->GetCurrentBinaryDirectory(),
t2->GetMakefile()->GetCurrentBinaryDirectory()) < 0;
}
return nameResult < 0;
}
cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
: CMakeInstance(cm)
{

View File

@ -42,6 +42,10 @@ class cmInstallTargetGenerator;
class cmInstallFilesGenerator;
class cmExportBuildFileGenerator;
typedef std::map<cmTarget const*,
cmGeneratorTarget*,
cmTarget::StrictTargetComparison> cmGeneratorTargetsType;
/** \class cmGlobalGenerator
* \brief Responsible for overseeing the generation process for the entire tree
*

View File

@ -260,6 +260,10 @@ public:
return this->LinkLibrariesForVS6;}
#endif
struct StrictTargetComparison {
bool operator()(cmTarget const* t1, cmTarget const* t2) const;
};
private:
bool HandleLocationPropertyPolicy(cmMakefile* context) const;