[Cmake-commits] [cmake-commits] king committed cmComputeLinkInformation.cxx 1.25 1.26

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 14 14:21:59 EDT 2008


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

Modified Files:
	cmComputeLinkInformation.cxx 
Log Message:
ENH: Improve CMP0003 to provide more compatibility

  - Targets built in the tree now add compatibility paths too
  - The warning message's first list includes at most one item
    for each unique compatibility path
  - Clarified error message further


Index: cmComputeLinkInformation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkInformation.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** cmComputeLinkInformation.cxx	13 Mar 2008 20:23:18 -0000	1.25
--- cmComputeLinkInformation.cxx	14 Mar 2008 18:21:57 -0000	1.26
***************
*** 1002,1005 ****
--- 1002,1014 ----
      }
  
+   // For compatibility with CMake 2.4 include the item's directory in
+   // the linker search path.
+   if(this->OldLinkDirMode &&
+      this->OldLinkDirMask.find(cmSystemTools::GetFilenamePath(item)) ==
+      this->OldLinkDirMask.end())
+     {
+     this->OldLinkDirItems.push_back(item);
+     }
+ 
    // Now add the full path to the library.
    this->Items.push_back(Item(item, true));
***************
*** 1373,1386 ****
  
    // List the items that would add paths in old behavior.
!   os << " links to some items with known full path:\n";
    for(std::vector<std::string>::const_iterator
          i = this->OldLinkDirItems.begin();
        i != this->OldLinkDirItems.end(); ++i)
      {
!     os << "  " << *i << "\n";
      }
  
    // List the items that might need the old-style paths.
!   os << "and to some items with no path known:\n";
    {
    // Format the list of unknown items to be as short as possible while
--- 1382,1400 ----
  
    // List the items that would add paths in old behavior.
!   std::set<cmStdString> emitted;
!   os << " links to some items by full path not located in any linker search "
!      << "directory added by a link_directories command:\n";
    for(std::vector<std::string>::const_iterator
          i = this->OldLinkDirItems.begin();
        i != this->OldLinkDirItems.end(); ++i)
      {
!     if(emitted.insert(cmSystemTools::GetFilenamePath(*i)).second)
!       {
!       os << "  " << *i << "\n";
!       }
      }
  
    // List the items that might need the old-style paths.
!   os << "This is okay but it also links to some items with no path known:\n";
    {
    // Format the list of unknown items to be as short as possible while



More information about the Cmake-commits mailing list