Browse Source

cmTarget: Run old-style link dependencies only for VS 6

Invoke it at runtime only with the VS 6 generator.  No other generators
need it.
Brad King 11 years ago
parent
commit
d57be904ae
3 changed files with 10 additions and 2 deletions
  1. 3 0
      Source/cmGlobalGenerator.h
  2. 2 0
      Source/cmGlobalVisualStudio6Generator.h
  3. 5 2
      Source/cmTarget.cxx

+ 3 - 0
Source/cmGlobalGenerator.h

@@ -214,6 +214,9 @@ public:
    */
   virtual void FindMakeProgram(cmMakefile*);
 
+  /** Is this the Visual Studio 6 generator?  */
+  virtual bool IsForVS6() const { return false; }
+
   ///! Find a target by name by searching the local generators.
   cmTarget* FindTarget(const std::string& name,
                        bool excludeAliases = false) const;

+ 2 - 0
Source/cmGlobalVisualStudio6Generator.h

@@ -91,6 +91,8 @@ public:
 
   virtual void FindMakeProgram(cmMakefile*);
 
+  virtual bool IsForVS6() const { return true; }
+
 protected:
   virtual const char* GetIDEVersion() { return "6.0"; }
 private:

+ 5 - 2
Source/cmTarget.cxx

@@ -517,8 +517,11 @@ void cmTarget::FinishConfigure()
   // invalidation code in this source file is buggy.
   this->ClearLinkMaps();
 
-  // Do old-style link dependency analysis.
-  this->AnalyzeLibDependenciesForVS6(*this->Makefile);
+  // Do old-style link dependency analysis only for CM_USE_OLD_VS6.
+  if(this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->IsForVS6())
+    {
+    this->AnalyzeLibDependenciesForVS6(*this->Makefile);
+    }
 }
 
 //----------------------------------------------------------------------------