diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-21 17:48:47 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-24 07:19:52 (GMT) |
commit | c2c239e607549d6513d95c3e919b4f509733bc87 (patch) | |
tree | 1fb0c316cf903bd15945fb464dc7617d73ff335d | |
parent | a8c0fbcc194bca6986492278e705ff301f283378 (diff) | |
download | CMake-c2c239e607549d6513d95c3e919b4f509733bc87.zip CMake-c2c239e607549d6513d95c3e919b4f509733bc87.tar.gz CMake-c2c239e607549d6513d95c3e919b4f509733bc87.tar.bz2 |
cmGlobalGenerator: Move GeneratorTargetsType to usage site.
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 12 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.h | 8 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 4 | ||||
-rw-r--r-- | 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<cmTarget const*, - cmGeneratorTarget*, - cmStrictTargetComparison> 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 <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) { 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<cmTarget const*, + cmGeneratorTarget*, + cmTarget::StrictTargetComparison> 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; |