From c2c239e607549d6513d95c3e919b4f509733bc87 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 21 Oct 2015 19:48:47 +0200 Subject: cmGlobalGenerator: Move GeneratorTargetsType to usage site. --- Source/cmGeneratorTarget.cxx | 12 ------------ Source/cmGeneratorTarget.h | 8 -------- Source/cmGlobalGenerator.cxx | 12 ++++++++++++ Source/cmGlobalGenerator.h | 4 ++++ Source/cmTarget.h | 4 ++++ 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 713ab6a..3f600b2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -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 diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 2dc3a6f..4383288 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -675,12 +675,4 @@ public: } }; -struct cmStrictTargetComparison { - bool operator()(cmTarget const* t1, cmTarget const* t2) const; -}; - -typedef std::map cmGeneratorTargetsType; - #endif diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 7e9b599..13efc4c 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -48,6 +48,18 @@ #include +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) { diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index c59d42d..18f5329 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -42,6 +42,10 @@ class cmInstallTargetGenerator; class cmInstallFilesGenerator; class cmExportBuildFileGenerator; +typedef std::map cmGeneratorTargetsType; + /** \class cmGlobalGenerator * \brief Responsible for overseeing the generation process for the entire tree * diff --git a/Source/cmTarget.h b/Source/cmTarget.h index e8c05da..1cae94f 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -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; -- cgit v0.12