[cmake-commits] king committed cmTarget.cxx 1.148 1.149

cmake-commits at cmake.org cmake-commits at cmake.org
Mon May 28 12:05:30 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6819

Modified Files:
	cmTarget.cxx 
Log Message:
ENH: Moved link library related code from GenerateSourceFilesFromSourceLists to AnalyzeLibDependencies to make the former do no more than what its name says.


Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- cmTarget.cxx	28 May 2007 15:18:15 -0000	1.148
+++ cmTarget.cxx	28 May 2007 16:05:28 -0000	1.149
@@ -694,16 +694,8 @@
       this->SourceFiles.push_back(mf.AddSource(file));
       }
     }
-  
-  // expand any link library variables whle we are at it
-  LinkLibraryVectorType::iterator p = this->LinkLibraries.begin();
-  for (;p != this->LinkLibraries.end(); ++p)
-    {
-    mf.ExpandVariablesInString(p->first, true, true);
-    }
 }
 
-
 void cmTarget::MergeLinkLibraries( cmMakefile& mf,
                                    const char *selfname,
                                    const LinkLibraryVectorType& libs )
@@ -977,6 +969,19 @@
   //    cyclic dependencies, so this is probably not a big deal. Note that
   //    the link line is always correct, just not necessary optimal.
 
+  {
+  // Expand variables in link library names.  This is for backwards
+  // compatibility with very early CMake versions and should
+  // eventually be removed.  This code was moved here from the end of
+  // old source list processing code which was called just before this
+  // method.
+  for(LinkLibraryVectorType::iterator p = this->LinkLibraries.begin();
+      p != this->LinkLibraries.end(); ++p)
+    {
+    this->Makefile->ExpandVariablesInString(p->first, true, true);
+    }
+  }
+
   typedef std::vector< std::string > LinkLine;
 
   // The dependency map.



More information about the Cmake-commits mailing list