From f210cb131e5814631d6d2974cf2437632446654f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 23 Oct 2015 00:59:36 +0200 Subject: cmTarget: Make compatbility API explicit. --- Source/cmMakefile.cxx | 21 ++++++++++++++++----- Source/cmTarget.cxx | 17 ----------------- Source/cmTarget.h | 8 ++------ 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 40e2892..361aa99 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -756,15 +756,26 @@ void cmMakefile::ConfigureFinalPass() "with CMake 2.4 or later. For compatibility with older versions please " "use any CMake 2.8.x release or lower."); } - for (cmTargets::iterator l = this->Targets.begin(); - l != this->Targets.end(); l++) +#if defined(_WIN32) && !defined(__CYGWIN__) + // Do old-style link dependency analysis only for CM_USE_OLD_VS6. + if(this->GetGlobalGenerator()->IsForVS6()) { - if (l->second.GetType() == cmState::INTERFACE_LIBRARY) + for (cmTargets::iterator l = this->Targets.begin(); + l != this->Targets.end(); l++) { - continue; + if (l->second.GetType() == cmState::INTERFACE_LIBRARY) + { + continue; + } + // Erase any cached link information that might have been comptued + // on-demand during the configuration. This ensures that build + // system generation uses up-to-date information even if other cache + // invalidation code in this source file is buggy. + + l->second.AnalyzeLibDependenciesForVS6(*this); } - l->second.FinishConfigure(); } +#endif } //---------------------------------------------------------------------------- diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0c0cf8e..c887fc8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -315,23 +315,6 @@ cmListFileBacktrace const* cmTarget::GetUtilityBacktrace( } //---------------------------------------------------------------------------- -void cmTarget::FinishConfigure() -{ - // Erase any cached link information that might have been comptued - // on-demand during the configuration. This ensures that build - // system generation uses up-to-date information even if other cache - // invalidation code in this source file is buggy. - -#if defined(_WIN32) && !defined(__CYGWIN__) - // Do old-style link dependency analysis only for CM_USE_OLD_VS6. - if(this->Makefile->GetGlobalGenerator()->IsForVS6()) - { - this->AnalyzeLibDependenciesForVS6(*this->Makefile); - } -#endif -} - -//---------------------------------------------------------------------------- cmListFileBacktrace const& cmTarget::GetBacktrace() const { return this->Backtrace; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 7e7e34a..17a1d4d 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -176,9 +176,6 @@ public: std::setconst& GetUtilities() const { return this->Utilities; } cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const; - /** Finalize the target at the end of the Configure step. */ - void FinishConfigure(); - ///! Set/Get a property of this target file void SetProperty(const std::string& prop, const char *value); void AppendProperty(const std::string& prop, const char* value, @@ -250,10 +247,11 @@ public: cmStringRange GetLinkImplementationEntries() const; cmBacktraceRange GetLinkImplementationBacktraces() const; - #if defined(_WIN32) && !defined(__CYGWIN__) const LinkLibraryVectorType &GetLinkLibrariesForVS6() const { return this->LinkLibrariesForVS6;} + + void AnalyzeLibDependenciesForVS6( const cmMakefile& mf ); #endif struct StrictTargetComparison { @@ -312,8 +310,6 @@ private: void GatherDependenciesForVS6( const cmMakefile& mf, const LibraryID& lib, DependencyMap& dep_map); - - void AnalyzeLibDependenciesForVS6( const cmMakefile& mf ); #endif const char* GetSuffixVariableInternal(bool implib) const; -- cgit v0.12