[Cmake-commits] [cmake-commits] king committed cmComputeLinkDepends.cxx 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jul 30 09:25:54 EDT 2008


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

Modified Files:
	cmComputeLinkDepends.cxx 
Log Message:
BUG: Preserve shared lib order for 2.4 compatibility

We preserve the order and multiplicity of libraries directly linked by a
target as specified by the user.  Items known to be shared libraries may
be safely skipped because order preservation is only needed for static
libraries.  However, CMake 2.4 did not skip shared libs, so we do the
same when in 2.4 compatibility mode.


Index: cmComputeLinkDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmComputeLinkDepends.cxx	30 Apr 2008 22:04:47 -0000	1.17
--- cmComputeLinkDepends.cxx	30 Jul 2008 13:25:52 -0000	1.18
***************
*** 882,885 ****
--- 882,890 ----
  void cmComputeLinkDepends::PreserveOriginalEntries()
  {
+   // In CMake 2.4 and below all link items were included in order
+   // preservation.  In CMake 2.6 and above we know it is safe to skip
+   // shared libraries.
+   bool skipShared = !this->LocalGenerator->NeedBackwardsCompatibility(2,4);
+ 
    // Regular expression to match shared libraries.
    cmsys::RegularExpression shared_lib(this->SharedRegexString.c_str());
***************
*** 894,898 ****
      cmTarget* tgt = this->EntryList[*in].Target;
      if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (!tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.
--- 899,903 ----
      cmTarget* tgt = this->EntryList[*in].Target;
      if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (skipShared && !tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.
***************
*** 918,922 ****
      cmTarget* tgt = this->EntryList[*in].Target;
      if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (!tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.
--- 923,927 ----
      cmTarget* tgt = this->EntryList[*in].Target;
      if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) ||
!        (skipShared && !tgt && shared_lib.find(this->EntryList[*in].Item)))
        {
        // Skip input items known to not be static libraries.



More information about the Cmake-commits mailing list