[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7041-gb7f0ca3

Stephen Kelly steveire at gmail.com
Sat Jan 11 08:30:58 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  b7f0ca3c98ac9e17886b7e2f98a25c34abef0a1b (commit)
       via  dc787b1e164d4497b8e304dc0a957c47c7ea9667 (commit)
       via  c4c827dc5e8b7bfb6d504a6122413805e799b8d9 (commit)
       via  16ca91bbd70fc64376df2681fcfa66dfd576eba9 (commit)
       via  7c1180c93a7680a3547dcac0b1981f665083a898 (commit)
       via  ccd0e64f4663fad2576e8ad6180ba8c7616c7261 (commit)
       via  871156b5be6fef78df80698b083968e75295d0f6 (commit)
       via  20931df26fa7a916653428f4863149809e9b68e2 (commit)
       via  6302c91ffa12ebd62a77a211b2648b54354d90b4 (commit)
       via  4c2ce1b6fbc87132d8b926713dd090f727328ad7 (commit)
      from  121302e0ca5e4c6de6a40686a5a46b9189f88e49 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b7f0ca3c98ac9e17886b7e2f98a25c34abef0a1b
commit b7f0ca3c98ac9e17886b7e2f98a25c34abef0a1b
Merge: 121302e dc787b1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jan 11 08:30:56 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 11 08:30:56 2014 -0500

    Merge topic 'use-generator-target' into next
    
    dc787b1 Merge note: Dashboard testing.
    c4c827d Remove old-style link dependency code.
    16ca91b Move GetOutputName to cmGeneratorTarget.
    7c1180c Move link libraries methods to cmGeneratorTarget.
    ccd0e64 Port cmComputeTargetDepends to cmGeneratorTarget.
    871156b Move HaveBuildTreeRPATH to cmGeneratorTarget.
    20931df Move ComputeVersionedName to cmGeneratorTarget.
    6302c91 Port part of cmLinkInformation to cmGeneratorTarget.
    4c2ce1b Move HasMacOSXRPath to cmGeneratorTarget.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc787b1e164d4497b8e304dc0a957c47c7ea9667
commit dc787b1e164d4497b8e304dc0a957c47c7ea9667
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 10 21:55:30 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:06 2014 +0100

    Merge note: Dashboard testing.
    
    This topic is not going to be merged to master until CMake 4.0, but
    is being merged now to next to find issues reportable by the dashboard
    which should be fixed before 3.0.

diff --git a/TempMerge b/TempMerge
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/TempMerge
@@ -0,0 +1 @@
+1

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4c827dc5e8b7bfb6d504a6122413805e799b8d9
commit c4c827dc5e8b7bfb6d504a6122413805e799b8d9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 10 11:30:08 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:06 2014 +0100

    Remove old-style link dependency code.

diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx
index 1e2a85c..7aeed5d 100644
--- a/Source/cmCommands.cxx
+++ b/Source/cmCommands.cxx
@@ -17,7 +17,6 @@
 #include "cmCMakeHostSystemInformationCommand.cxx"
 #include "cmElseIfCommand.cxx"
 #include "cmExportCommand.cxx"
-#include "cmExportLibraryDependencies.cxx"
 #include "cmFLTKWrapUICommand.cxx"
 #include "cmIncludeExternalMSProjectCommand.cxx"
 #include "cmInstallProgramsCommand.cxx"
@@ -60,7 +59,6 @@ void GetPredefinedCommands(std::list<cmCommand*>&
   commands.push_back(new cmCMakeHostSystemInformationCommand);
   commands.push_back(new cmElseIfCommand);
   commands.push_back(new cmExportCommand);
-  commands.push_back(new cmExportLibraryDependenciesCommand);
   commands.push_back(new cmFLTKWrapUICommand);
   commands.push_back(new cmIncludeExternalMSProjectCommand);
   commands.push_back(new cmInstallProgramsCommand);
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index cc34132..ddd7bc7 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -190,9 +190,6 @@ cmComputeLinkDepends
   // Enable debug mode if requested.
   this->DebugMode = this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE");
 
-  // Assume no compatibility until set.
-  this->OldLinkDirMode = false;
-
   // No computation has been done.
   this->CCG = 0;
 }
@@ -210,12 +207,6 @@ cmComputeLinkDepends::~cmComputeLinkDepends()
 }
 
 //----------------------------------------------------------------------------
-void cmComputeLinkDepends::SetOldLinkDirMode(bool b)
-{
-  this->OldLinkDirMode = b;
-}
-
-//----------------------------------------------------------------------------
 std::vector<cmComputeLinkDepends::LinkEntry> const&
 cmComputeLinkDepends::Compute()
 {
@@ -226,7 +217,7 @@ cmComputeLinkDepends::Compute()
   while(!this->BFSQueue.empty())
     {
     // Get the next entry.
-    BFSEntry qe = this->BFSQueue.front();
+    int qe = this->BFSQueue.front();
     this->BFSQueue.pop();
 
     // Follow the entry's dependencies.
@@ -318,35 +309,21 @@ int cmComputeLinkDepends::AddLinkEntry(int depender_index,
   if(entry.Target)
     {
     // Target dependencies are always known.  Follow them.
-    BFSEntry qe = {index, 0};
-    this->BFSQueue.push(qe);
+    this->BFSQueue.push(index);
     }
-  else
+  else if(!entry.IsFlag)
     {
-    // Look for an old-style <item>_LIB_DEPENDS variable.
-    std::string var = entry.Item;
-    var += "_LIB_DEPENDS";
-    if(const char* val = this->Makefile->GetDefinition(var.c_str()))
-      {
-      // The item dependencies are known.  Follow them.
-      BFSEntry qe = {index, val};
-      this->BFSQueue.push(qe);
-      }
-    else if(!entry.IsFlag)
-      {
-      // The item dependencies are not known.  We need to infer them.
-      this->InferredDependSets[index] = new DependSetList;
-      }
+    // The item dependencies are not known.  We need to infer them.
+    this->InferredDependSets[index] = new DependSetList;
     }
 
   return index;
 }
 
 //----------------------------------------------------------------------------
-void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
+void cmComputeLinkDepends::FollowLinkEntry(int depender_index)
 {
   // Get this entry representation.
-  int depender_index = qe.Index;
   LinkEntry const& entry = this->EntryList[depender_index];
 
   // Follow the item's dependencies.
@@ -371,21 +348,8 @@ void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
 
       // Handle dependent shared libraries.
       this->FollowSharedDeps(depender_index, iface);
-
-      // Support for CMP0003.
-      for(std::vector<std::string>::const_iterator
-            oi = iface->WrongConfigLibraries.begin();
-          oi != iface->WrongConfigLibraries.end(); ++oi)
-        {
-        this->CheckWrongConfigItem(depender_index, *oi);
-        }
       }
     }
-  else
-    {
-    // Follow the old-style dependency list.
-    this->AddVarLinkEntries(depender_index, qe.LibDepends);
-    }
 }
 
 //----------------------------------------------------------------------------
@@ -469,82 +433,6 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep)
 }
 
 //----------------------------------------------------------------------------
-void cmComputeLinkDepends::AddVarLinkEntries(int depender_index,
-                                             const char* value)
-{
-  // This is called to add the dependencies named by
-  // <item>_LIB_DEPENDS.  The variable contains a semicolon-separated
-  // list.  The list contains link-type;item pairs and just items.
-  std::vector<std::string> deplist;
-  cmSystemTools::ExpandListArgument(value, deplist);
-
-  // Look for entries meant for this configuration.
-  std::vector<std::string> actual_libs;
-  cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
-  bool haveLLT = false;
-  for(std::vector<std::string>::const_iterator di = deplist.begin();
-      di != deplist.end(); ++di)
-    {
-    if(*di == "debug")
-      {
-      llt = cmTarget::DEBUG;
-      haveLLT = true;
-      }
-    else if(*di == "optimized")
-      {
-      llt = cmTarget::OPTIMIZED;
-      haveLLT = true;
-      }
-    else if(*di == "general")
-      {
-      llt = cmTarget::GENERAL;
-      haveLLT = true;
-      }
-    else if(!di->empty())
-      {
-      // If no explicit link type was given prior to this entry then
-      // check if the entry has its own link type variable.  This is
-      // needed for compatibility with dependency files generated by
-      // the export_library_dependencies command from CMake 2.4 and
-      // lower.
-      if(!haveLLT)
-        {
-        std::string var = *di;
-        var += "_LINK_TYPE";
-        if(const char* val = this->Makefile->GetDefinition(var.c_str()))
-          {
-          if(strcmp(val, "debug") == 0)
-            {
-            llt = cmTarget::DEBUG;
-            }
-          else if(strcmp(val, "optimized") == 0)
-            {
-            llt = cmTarget::OPTIMIZED;
-            }
-          }
-        }
-
-      // If the library is meant for this link type then use it.
-      if(llt == cmTarget::GENERAL || llt == this->LinkType)
-        {
-        actual_libs.push_back(*di);
-        }
-      else if(this->OldLinkDirMode)
-        {
-        this->CheckWrongConfigItem(depender_index, *di);
-        }
-
-      // Reset the link type until another explicit type is given.
-      llt = cmTarget::GENERAL;
-      haveLLT = false;
-      }
-    }
-
-  // Add the entries from this list.
-  this->AddLinkEntries(depender_index, actual_libs);
-}
-
-//----------------------------------------------------------------------------
 void cmComputeLinkDepends::AddDirectLinkEntries()
 {
   cmGeneratorTarget *gtgt = this->Target->GetMakefile()->GetLocalGenerator()
@@ -554,12 +442,6 @@ void cmComputeLinkDepends::AddDirectLinkEntries()
   cmGeneratorTarget::LinkImplementation const* impl =
     gtgt->GetLinkImplementation(this->Config, this->HeadTarget);
   this->AddLinkEntries(-1, impl->Libraries);
-  for(std::vector<std::string>::const_iterator
-        wi = impl->WrongConfigLibraries.begin();
-      wi != impl->WrongConfigLibraries.end(); ++wi)
-    {
-    this->CheckWrongConfigItem(-1, *wi);
-    }
 }
 
 //----------------------------------------------------------------------------
@@ -576,7 +458,7 @@ cmComputeLinkDepends::AddLinkEntries(int depender_index,
     {
     // Skip entries that will resolve to the target getting linked or
     // are empty.
-    std::string item = this->Target->CheckCMP0004(*li);
+    std::string item = *li;
     if(item == this->Target->GetName() || item.empty())
       {
       continue;
@@ -997,25 +879,3 @@ void cmComputeLinkDepends::DisplayFinalEntries()
     }
   fprintf(stderr, "\n");
 }
-
-//----------------------------------------------------------------------------
-void cmComputeLinkDepends::CheckWrongConfigItem(int depender_index,
-                                                std::string const& item)
-{
-  if(!this->OldLinkDirMode)
-    {
-    return;
-    }
-
-  // For CMake 2.4 bug-compatibility we need to consider the output
-  // directories of targets linked in another configuration as link
-  // directories.
-  if(cmTarget const* tgt
-                      = this->FindTargetToLink(depender_index, item.c_str()))
-    {
-    if(!tgt->IsImported())
-      {
-      this->OldWrongConfigItems.insert(tgt);
-      }
-    }
-}
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index bf0b55c..ffa9c00 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -52,10 +52,6 @@ public:
   typedef std::vector<LinkEntry> EntryVector;
   EntryVector const& Compute();
 
-  void SetOldLinkDirMode(bool b);
-  std::set<cmTarget const*> const& GetOldWrongConfigItems() const
-    { return this->OldWrongConfigItems; }
-
 private:
 
   // Context information.
@@ -79,7 +75,6 @@ private:
   std::map<cmStdString, int>::iterator
   AllocateLinkEntry(std::string const& item);
   int AddLinkEntry(int depender_index, std::string const& item);
-  void AddVarLinkEntries(int depender_index, const char* value);
   void AddDirectLinkEntries();
   void AddLinkEntries(int depender_index,
                       std::vector<std::string> const& libs);
@@ -89,14 +84,8 @@ private:
   std::vector<LinkEntry> EntryList;
   std::map<cmStdString, int> LinkEntryIndex;
 
-  // BFS of initial dependencies.
-  struct BFSEntry
-  {
-    int Index;
-    const char* LibDepends;
-  };
-  std::queue<BFSEntry> BFSQueue;
-  void FollowLinkEntry(BFSEntry const&);
+  std::queue<int> BFSQueue;
+  void FollowLinkEntry(int);
 
   // Shared libraries that are included only because they are
   // dependencies of other shared libraries, not because they are part
@@ -160,11 +149,6 @@ private:
 
   // Record of the original link line.
   std::vector<int> OriginalEntries;
-
-  // Compatibility help.
-  bool OldLinkDirMode;
-  void CheckWrongConfigItem(int depender_index, std::string const& item);
-  std::set<cmTarget const*> OldWrongConfigItems;
 };
 
 #endif
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 74102c6..a873f46 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -395,32 +395,6 @@ cmComputeLinkInformation
     this->OrderDependentRPath
       ->AddLanguageDirectories(this->RuntimeLinkDirs);
     }
-
-  // Decide whether to enable compatible library search path mode.
-  // There exists code that effectively does
-  //
-  //    /path/to/libA.so -lB
-  //
-  // where -lB is meant to link to /path/to/libB.so.  This is broken
-  // because it specified -lB without specifying a link directory (-L)
-  // in which to search for B.  This worked in CMake 2.4 and below
-  // because -L/path/to would be added by the -L/-l split for A.  In
-  // order to support such projects we need to add the directories
-  // containing libraries linked with a full path to the -L path.
-  this->OldLinkDirMode =
-    this->Target->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW;
-  if(this->OldLinkDirMode)
-    {
-    // Construct a mask to not bother with this behavior for link
-    // directories already specified by the user.
-    std::vector<std::string> const& dirs =
-                                  this->Target->Target->GetLinkDirectories();
-    for(std::vector<std::string>::const_iterator di = dirs.begin();
-        di != dirs.end(); ++di)
-      {
-      this->OldLinkDirMask.insert(*di);
-      }
-    }
 }
 
 //----------------------------------------------------------------------------
@@ -512,7 +486,6 @@ bool cmComputeLinkInformation::Compute()
   // Compute the ordered link line items.
   cmComputeLinkDepends cld(this->Target->Target, this->Config,
                            this->HeadTarget->Target);
-  cld.SetOldLinkDirMode(this->OldLinkDirMode);
   cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
 
   // Add the link line items.
@@ -542,34 +515,6 @@ bool cmComputeLinkInformation::Compute()
     this->SetCurrentLinkType(this->StartLinkType);
     }
 
-  // Finish listing compatibility paths.
-  if(this->OldLinkDirMode)
-    {
-    // For CMake 2.4 bug-compatibility we need to consider the output
-    // directories of targets linked in another configuration as link
-    // directories.
-    std::set<cmTarget const*> const& wrongItems = cld.GetOldWrongConfigItems();
-    for(std::set<cmTarget const*>::const_iterator i = wrongItems.begin();
-        i != wrongItems.end(); ++i)
-      {
-      cmTarget const* tgt = *i;
-      cmGeneratorTarget *gtgt = tgt->GetMakefile()->GetLocalGenerator()
-                                   ->GetGlobalGenerator()
-                                   ->GetGeneratorTarget(tgt);
-      bool implib =
-        (this->UseImportLibrary &&
-         (tgt->GetType() == cmTarget::SHARED_LIBRARY));
-      std::string lib = gtgt->GetFullPath(this->Config , implib, true);
-      this->OldLinkDirItems.push_back(lib);
-      }
-    }
-
-  // Finish setting up linker search directories.
-  if(!this->FinishLinkerSearchDirectories())
-    {
-    return false;
-    }
-
   // Add implicit language runtime libraries and directories.
   this->AddImplicitLinkInfo();
 
@@ -709,7 +654,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
     else
       {
       // This is a library or option specified by the user.
-      this->AddUserItem(item, true);
+      this->AddUserItem(item);
       }
     }
 }
@@ -1117,15 +1062,6 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
     this->Items.push_back(Item(this->LibLinkFileFlag, false));
     }
 
-  // For compatibility with CMake 2.4 include the item's directory in
-  // the linker search path.
-  if(this->OldLinkDirMode && !target->IsFrameworkOnApple() &&
-     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, target));
 }
@@ -1180,15 +1116,6 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item)
       }
     }
 
-  // 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);
-    }
-
   // If this platform wants a flag before the full path, add it.
   if(!this->LibLinkFileFlag.empty())
     {
@@ -1233,7 +1160,7 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(std::string const& item)
   // directory then just report the file name without the directory
   // portion.  This will allow the system linker to locate the proper
   // library for the architecture at link time.
-  this->AddUserItem(file, false);
+  this->AddUserItem(file);
 
   // Make sure the link directory ordering will find the library.
   this->OrderLinkerSearchPath->AddLinkLibrary(item);
@@ -1242,8 +1169,7 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(std::string const& item)
 }
 
 //----------------------------------------------------------------------------
-void cmComputeLinkInformation::AddUserItem(std::string const& item,
-                                           bool pathNotKnown)
+void cmComputeLinkInformation::AddUserItem(std::string const& item)
 {
   // This is called to handle a link item that does not match a CMake
   // target and is not a full path.  We check here if it looks like a
@@ -1256,16 +1182,6 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item,
   // Pass flags through untouched.
   if(item[0] == '-' || item[0] == '$' || item[0] == '`')
     {
-    // if this is a -l option then we might need to warn about
-    // CMP0003 so put it in OldUserFlagItems, if it is not a -l
-    // or -Wl,-l (-framework -pthread), then allow it without a
-    // CMP0003 as -L will not affect those other linker flags
-    if(item.find("-l") == 0 ||  item.find("-Wl,-l") == 0)
-      {
-      // This is a linker option provided by the user.
-      this->OldUserFlagItems.push_back(item);
-      }
-
     // Restore the target link type since this item does not specify
     // one.
     this->SetCurrentLinkType(this->StartLinkType);
@@ -1334,12 +1250,6 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item,
     }
   else
     {
-    // This is a name specified by the user.
-    if(pathNotKnown)
-      {
-      this->OldUserFlagItems.push_back(item);
-      }
-
     // We must ask the linker to search for a library with this name.
     // Restore the target link type since this item does not specify
     // one.
@@ -1493,7 +1403,7 @@ void cmComputeLinkInformation::AddSharedLibNoSOName(std::string const& item)
   // runtime the dynamic linker will search for the library using the
   // path instead of just the name.
   std::string file = cmSystemTools::GetFilenameName(item);
-  this->AddUserItem(file, false);
+  this->AddUserItem(file);
 
   // Make sure the link directory ordering will find the library.
   this->OrderLinkerSearchPath->AddLinkLibrary(item);
@@ -1512,9 +1422,8 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
     }
 
   // Tell the linker to search for the item and provide the proper
-  // path for it.  Do not contribute to any CMP0003 warning (do not
-  // put in OldLinkDirItems or OldUserFlagItems).
-  this->AddUserItem(file, false);
+  // path for it.
+  this->AddUserItem(file);
   this->OrderLinkerSearchPath->AddLinkLibrary(item);
 
   // Produce any needed message.
@@ -1561,127 +1470,6 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
 }
 
 //----------------------------------------------------------------------------
-bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
-{
-  // Support broken projects if necessary.
-  if(this->OldLinkDirItems.empty() || this->OldUserFlagItems.empty() ||
-     !this->OldLinkDirMode)
-    {
-    return true;
-    }
-
-  // Enforce policy constraints.
-  switch(this->Target->Target->GetPolicyStatusCMP0003())
-    {
-    case cmPolicies::WARN:
-      if(!this->CMakeInstance->GetPropertyAsBool("CMP0003-WARNING-GIVEN"))
-        {
-        this->CMakeInstance->SetProperty("CMP0003-WARNING-GIVEN", "1");
-        cmOStringStream w;
-        this->PrintLinkPolicyDiagnosis(w);
-        this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
-                                        this->Target->Target->GetBacktrace());
-        }
-    case cmPolicies::OLD:
-      // OLD behavior is to add the paths containing libraries with
-      // known full paths as link directories.
-      break;
-    case cmPolicies::NEW:
-      // Should never happen due to assignment of OldLinkDirMode
-      return true;
-    case cmPolicies::REQUIRED_IF_USED:
-    case cmPolicies::REQUIRED_ALWAYS:
-      {
-      cmOStringStream e;
-      e << (this->Makefile->GetPolicies()->
-            GetRequiredPolicyError(cmPolicies::CMP0003)) << "\n";
-      this->PrintLinkPolicyDiagnosis(e);
-      this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(),
-                                        this->Target->Target->GetBacktrace());
-      return false;
-      }
-    }
-
-  // Add the link directories for full path items.
-  for(std::vector<std::string>::const_iterator
-        i = this->OldLinkDirItems.begin();
-      i != this->OldLinkDirItems.end(); ++i)
-    {
-    this->OrderLinkerSearchPath->AddLinkLibrary(*i);
-    }
-  return true;
-}
-
-//----------------------------------------------------------------------------
-void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os)
-{
-  // Tell the user what to do.
-  os << "Policy CMP0003 should be set before this line.  "
-     << "Add code such as\n"
-     << "  if(COMMAND cmake_policy)\n"
-     << "    cmake_policy(SET CMP0003 NEW)\n"
-     << "  endif(COMMAND cmake_policy)\n"
-     << "as early as possible but after the most recent call to "
-     << "cmake_minimum_required or cmake_policy(VERSION).  ";
-
-  // List the items that might need the old-style paths.
-  os << "This warning appears because target \""
-     << this->Target->GetName() << "\" "
-     << "links to some libraries for which the linker must search:\n";
-  {
-  // Format the list of unknown items to be as short as possible while
-  // still fitting in the allowed width (a true solution would be the
-  // bin packing problem if we were allowed to change the order).
-  std::string::size_type max_size = 76;
-  std::string line;
-  const char* sep = "  ";
-  for(std::vector<std::string>::const_iterator
-        i = this->OldUserFlagItems.begin();
-      i != this->OldUserFlagItems.end(); ++i)
-    {
-    // If the addition of another item will exceed the limit then
-    // output the current line and reset it.  Note that the separator
-    // is either " " or ", " which is always 2 characters.
-    if(!line.empty() && (line.size() + i->size() + 2) > max_size)
-      {
-      os << line << "\n";
-      sep = "  ";
-      line = "";
-      }
-    line += sep;
-    line += *i;
-    // Convert to the other separator.
-    sep = ", ";
-    }
-  if(!line.empty())
-    {
-    os << line << "\n";
-    }
-  }
-
-  // List the paths old behavior is adding.
-  os << "and other libraries with known full path:\n";
-  std::set<cmStdString> emitted;
-  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";
-      }
-    }
-
-  // Explain.
-  os << "CMake is adding directories in the second list to the linker "
-     << "search path in case they are needed to find libraries from the "
-     << "first list (for backwards compatibility with CMake 2.4).  "
-     << "Set policy CMP0003 to OLD or NEW to enable or disable this "
-     << "behavior explicitly.  "
-     << "Run \"cmake --help-policy CMP0003\" for more information.";
-}
-
-//----------------------------------------------------------------------------
 void cmComputeLinkInformation::LoadImplicitLinkInfo()
 {
   std::vector<std::string> implicitDirVec;
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index c39cb31..c26e39e 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -143,7 +143,7 @@ private:
   void AddTargetItem(std::string const& item, cmTarget const* target);
   void AddFullItem(std::string const& item);
   bool CheckImplicitDirItem(std::string const& item);
-  void AddUserItem(std::string const& item, bool pathNotKnown);
+  void AddUserItem(std::string const& item);
   void AddDirectoryItem(std::string const& item);
   void AddFrameworkItem(std::string const& item);
   void DropDirectoryItem(std::string const& item);
@@ -159,8 +159,6 @@ private:
 
   // Linker search path computation.
   cmOrderDirectories* OrderLinkerSearchPath;
-  bool FinishLinkerSearchDirectories();
-  void PrintLinkPolicyDiagnosis(std::ostream&);
 
   // Implicit link libraries and directories for linker language.
   void LoadImplicitLinkInfo();
@@ -172,12 +170,6 @@ private:
   // Additional paths configured by the runtime linker
   std::vector<std::string> RuntimeLinkDirs;
 
-  // Linker search path compatibility mode.
-  std::set<cmStdString> OldLinkDirMask;
-  std::vector<std::string> OldLinkDirItems;
-  std::vector<std::string> OldUserFlagItems;
-  bool OldLinkDirMode;
-
   // Runtime path computation.
   cmOrderDirectories* OrderRuntimeSearchPath;
   void AddLibraryRuntimeInfo(std::string const& fullPath,
diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx
deleted file mode 100644
index 4624e92..0000000
--- a/Source/cmExportLibraryDependencies.cxx
+++ /dev/null
@@ -1,208 +0,0 @@
-/*============================================================================
-  CMake - Cross Platform Makefile Generator
-  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-
-  Distributed under the OSI-approved BSD License (the "License");
-  see accompanying file Copyright.txt for details.
-
-  This software is distributed WITHOUT ANY WARRANTY; without even the
-  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  See the License for more information.
-============================================================================*/
-#include "cmExportLibraryDependencies.h"
-#include "cmGlobalGenerator.h"
-#include "cmLocalGenerator.h"
-#include "cmGeneratedFileStream.h"
-#include "cmake.h"
-#include "cmVersion.h"
-
-#include <cmsys/auto_ptr.hxx>
-
-bool cmExportLibraryDependenciesCommand
-::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
-{
-  if(this->Disallowed(cmPolicies::CMP0033,
-      "The export_library_dependencies command should not be called; "
-      "see CMP0033."))
-    { return true; }
-  if(args.size() < 1 )
-    {
-    this->SetError("called with incorrect number of arguments");
-    return false;
-    }
-
-  // store the arguments for the final pass
-  this->Filename = args[0];
-  this->Append = false;
-  if(args.size() > 1)
-    {
-    if(args[1] == "APPEND")
-      {
-      this->Append = true;
-      }
-    }
-  return true;
-}
-
-
-void cmExportLibraryDependenciesCommand::FinalPass()
-{
-  // export_library_dependencies() shouldn't modify anything
-  // ensure this by calling a const method
-  this->ConstFinalPass();
-}
-
-void cmExportLibraryDependenciesCommand::ConstFinalPass() const
-{
-  // Use copy-if-different if not appending.
-  cmsys::auto_ptr<cmsys::ofstream> foutPtr;
-  if(this->Append)
-    {
-    cmsys::auto_ptr<cmsys::ofstream> ap(
-      new cmsys::ofstream(this->Filename.c_str(), std::ios::app));
-    foutPtr = ap;
-    }
-  else
-    {
-    cmsys::auto_ptr<cmGeneratedFileStream> ap(
-      new cmGeneratedFileStream(this->Filename.c_str(), true));
-    ap->SetCopyIfDifferent(true);
-    foutPtr = ap;
-    }
-  std::ostream& fout = *foutPtr.get();
-
-  if (!fout)
-    {
-    cmSystemTools::Error("Error Writing ", this->Filename.c_str());
-    cmSystemTools::ReportLastSystemError("");
-    return;
-    }
-
-  // Collect dependency information about all library targets built in
-  // the project.
-  cmake* cm = this->Makefile->GetCMakeInstance();
-  cmGlobalGenerator* global = cm->GetGlobalGenerator();
-  const std::vector<cmLocalGenerator *>& locals = global->GetLocalGenerators();
-  std::map<cmStdString, cmStdString> libDepsOld;
-  std::map<cmStdString, cmStdString> libDepsNew;
-  std::map<cmStdString, cmStdString> libTypes;
-  for(std::vector<cmLocalGenerator *>::const_iterator i = locals.begin();
-      i != locals.end(); ++i)
-    {
-    const cmLocalGenerator* gen = *i;
-    const cmTargets &tgts = gen->GetMakefile()->GetTargets();
-    for(cmTargets::const_iterator l = tgts.begin();
-        l != tgts.end(); ++l)
-      {
-      // Get the current target.
-      cmTarget const& target = l->second;
-
-      // Skip non-library targets.
-      if(target.GetType() < cmTarget::STATIC_LIBRARY
-         || target.GetType() > cmTarget::MODULE_LIBRARY)
-        {
-        continue;
-        }
-
-      // Construct the dependency variable name.
-      std::string targetEntry = target.GetName();
-      targetEntry += "_LIB_DEPENDS";
-
-      // Construct the dependency variable value.  It is safe to use
-      // the target GetLinkLibraries method here because this code is
-      // called at the end of configure but before generate so library
-      // dependencies have yet to be analyzed.  Therefore the value
-      // will be the direct link dependencies.
-      std::string valueOld;
-      std::string valueNew;
-      cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries();
-      for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin();
-          li != libs.end(); ++li)
-        {
-        std::string ltVar = li->first;
-        ltVar += "_LINK_TYPE";
-        std::string ltValue;
-        switch(li->second)
-          {
-          case cmTarget::GENERAL:
-            valueNew += "general;";
-            ltValue = "general";
-            break;
-          case cmTarget::DEBUG:
-            valueNew += "debug;";
-            ltValue = "debug";
-            break;
-          case cmTarget::OPTIMIZED:
-            valueNew += "optimized;";
-            ltValue = "optimized";
-            break;
-          }
-        std::string lib = li->first;
-        if(cmTarget* libtgt = global->FindTarget(0, lib.c_str()))
-          {
-          // Handle simple output name changes.  This command is
-          // deprecated so we do not support full target name
-          // translation (which requires per-configuration info).
-          if(const char* outname = libtgt->GetProperty("OUTPUT_NAME"))
-            {
-            lib = outname;
-            }
-          }
-        valueOld += lib;
-        valueOld += ";";
-        valueNew += lib;
-        valueNew += ";";
-
-        std::string& ltEntry = libTypes[ltVar];
-        if(ltEntry.empty())
-          {
-          ltEntry = ltValue;
-          }
-        else if(ltEntry != ltValue)
-          {
-          ltEntry = "general";
-          }
-        }
-      libDepsNew[targetEntry] = valueNew;
-      libDepsOld[targetEntry] = valueOld;
-      }
-    }
-
-  // Generate dependency information for both old and new style CMake
-  // versions.
-  const char* vertest =
-    "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4";
-  fout << "# Generated by CMake " <<  cmVersion::GetCMakeVersion() << "\n\n";
-  fout << "if(" << vertest << ")\n";
-  fout << "  # Information for CMake 2.6 and above.\n";
-  for(std::map<cmStdString, cmStdString>::const_iterator
-        i = libDepsNew.begin();
-      i != libDepsNew.end(); ++i)
-    {
-    if(!i->second.empty())
-      {
-      fout << "  set(\"" << i->first << "\" \"" << i->second << "\")\n";
-      }
-    }
-  fout << "else()\n";
-  fout << "  # Information for CMake 2.4 and lower.\n";
-  for(std::map<cmStdString, cmStdString>::const_iterator
-        i = libDepsOld.begin();
-      i != libDepsOld.end(); ++i)
-    {
-    if(!i->second.empty())
-      {
-      fout << "  set(\"" << i->first << "\" \"" << i->second << "\")\n";
-      }
-    }
-  for(std::map<cmStdString, cmStdString>::const_iterator i = libTypes.begin();
-      i != libTypes.end(); ++i)
-    {
-    if(i->second != "general")
-      {
-      fout << "  set(\"" << i->first << "\" \"" << i->second << "\")\n";
-      }
-    }
-  fout << "endif()\n";
-  return;
-}
diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h
deleted file mode 100644
index 29b568f..0000000
--- a/Source/cmExportLibraryDependencies.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*============================================================================
-  CMake - Cross Platform Makefile Generator
-  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-
-  Distributed under the OSI-approved BSD License (the "License");
-  see accompanying file Copyright.txt for details.
-
-  This software is distributed WITHOUT ANY WARRANTY; without even the
-  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  See the License for more information.
-============================================================================*/
-#ifndef cmExportLibraryDependenciesCommand_h
-#define cmExportLibraryDependenciesCommand_h
-
-#include "cmCommand.h"
-
-class cmExportLibraryDependenciesCommand : public cmCommand
-{
-public:
-  cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
-  virtual cmCommand* Clone() { return new cmExportLibraryDependenciesCommand; }
-  virtual bool InitialPass(std::vector<std::string> const& args,
-                           cmExecutionStatus &status);
-  virtual const char* GetName() const { return "export_library_dependencies";}
-  virtual bool IsDiscouraged() const { return true; }
-
-  virtual void FinalPass();
-  virtual bool HasFinalPass() const { return true; }
-
-private:
-  std::string Filename;
-  bool Append;
-  void ConstFinalPass() const;
-};
-
-
-#endif
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 3f3155e..d0d97dc 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -873,9 +873,6 @@ void cmGeneratorTarget::ComputeLinkImplementation(const char* config,
                                          LinkImplementation& impl,
                                          cmTarget const* head) const
 {
-  // Compute which library configuration to link.
-  cmTarget::LinkLibraryType linkType = this->Target->ComputeLinkType(config);
-
   // Collect libraries directly linked in this configuration.
   std::vector<std::string> llibs;
   this->GetDirectLinkLibraries(config, llibs, head);
@@ -967,23 +964,6 @@ void cmGeneratorTarget::ComputeLinkImplementation(const char* config,
     impl.Libraries.push_back(item);
     }
 
-  cmTarget::LinkLibraryVectorType const& oldllibs =
-                                    this->Target->GetOriginalLinkLibraries();
-  for(cmTarget::LinkLibraryVectorType::const_iterator li = oldllibs.begin();
-      li != oldllibs.end(); ++li)
-    {
-    if(li->second != cmTarget::GENERAL && li->second != linkType)
-      {
-      std::string item = this->Target->CheckCMP0004(li->first);
-      if(item == this->GetName() || item.empty())
-        {
-        continue;
-        }
-      // Support OLD behavior for CMP0003.
-      impl.WrongConfigLibraries.push_back(item);
-      }
-    }
-
   // This target needs runtime libraries for its source languages.
   std::set<cmStdString> languages;
   // Get languages used in our source files.
@@ -3342,7 +3322,6 @@ bool cmGeneratorTarget::ComputeLinkInterface(const char* config,
                               this->GetLinkImplementation(config, headTarget);
     iface.ImplementationIsInterface = true;
     iface.Libraries = impl->Libraries;
-    iface.WrongConfigLibraries = impl->WrongConfigLibraries;
     if(this->Target->LinkLanguagePropagatesToDependents())
       {
       // Targets using this archive need its language runtime libraries.
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 9795a00..adc2414 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -219,10 +219,6 @@ public:
     // or more static libraries.
     int Multiplicity;
 
-    // Libraries listed for other configurations.
-    // Needed only for OLD behavior of CMP0003.
-    std::vector<std::string> WrongConfigLibraries;
-
     bool ImplementationIsInterface;
 
     LinkInterface(): Multiplicity(0), ImplementationIsInterface(false) {}
@@ -313,10 +309,6 @@ public:
 
     // Libraries linked directly in this configuration.
     std::vector<std::string> Libraries;
-
-    // Libraries linked directly in other configurations.
-    // Needed only for OLD behavior of CMP0003.
-    std::vector<std::string> WrongConfigLibraries;
   };
   typedef std::map<cmStdString, LinkImplementation> LinkImplMapType;
 
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5ff1510..a9fa501 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1501,29 +1501,6 @@ void cmGlobalGenerator::CheckLocalGenerators()
         {
         continue;
         }
-      const cmTarget::LinkLibraryVectorType& libs =
-        l->second.GetOriginalLinkLibraries();
-      for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin();
-          lib != libs.end(); ++lib)
-        {
-        if(lib->first.size() > 9 &&
-           cmSystemTools::IsNOTFOUND(lib->first.c_str()))
-          {
-          std::string varName = lib->first.substr(0, lib->first.size()-9);
-          cmCacheManager::CacheIterator it =
-            manager->GetCacheIterator(varName.c_str());
-          if(it.GetPropertyAsBool("ADVANCED"))
-            {
-            varName += " (ADVANCED)";
-            }
-          std::string text = notFoundMap[varName];
-          text += "\n    linked by target \"";
-          text += l->second.GetName();
-          text += "\" in directory ";
-          text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory();
-          notFoundMap[varName] = text;
-          }
-        }
       std::vector<std::string> incs;
       const char *incDirProp = l->second.GetProperty("INCLUDE_DIRECTORIES");
       if (!incDirProp)
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 3a7070e..8944c69 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -291,6 +291,7 @@ void cmGraphVizWriter::WriteConnections(const char* targetName,
                                     std::set<std::string>& insertedConnections,
                                     cmGeneratedFileStream& str) const
 {
+  (void)insertedConnections;
   std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt =
                                              this->TargetPtrs.find(targetName);
 
@@ -309,39 +310,6 @@ void cmGraphVizWriter::WriteConnections(const char* targetName,
 
   std::string myNodeName = this->TargetNamesNodes.find(targetName)->second;
 
-  const cmTarget::LinkLibraryVectorType* ll =
-                            &(targetPtrIt->second->GetOriginalLinkLibraries());
-
-  for (cmTarget::LinkLibraryVectorType::const_iterator llit = ll->begin();
-       llit != ll->end();
-       ++ llit )
-    {
-    const char* libName = llit->first.c_str();
-    std::map<cmStdString, cmStdString>::const_iterator libNameIt =
-                                          this->TargetNamesNodes.find(libName);
-
-    // can happen e.g. if GRAPHVIZ_TARGET_IGNORE_REGEX is used
-    if(libNameIt == this->TargetNamesNodes.end())
-      {
-      continue;
-      }
-
-    std::string connectionName = myNodeName;
-    connectionName += "-";
-    connectionName += libNameIt->second;
-    if (insertedConnections.find(connectionName) == insertedConnections.end())
-      {
-      insertedConnections.insert(connectionName);
-      this->WriteNode(libName, this->TargetPtrs.find(libName)->second,
-                      insertedNodes, str);
-
-      str << "    \"" << myNodeName.c_str() << "\" -> \""
-          << libNameIt->second.c_str() << "\"";
-      str << " // " << targetName << " -> " << libName << std::endl;
-      this->WriteConnections(libName, insertedNodes, insertedConnections, str);
-      }
-    }
-
 }
 
 
@@ -350,6 +318,7 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName,
                                     std::set<std::string>& insertedConnections,
                                     cmGeneratedFileStream& str) const
 {
+  (void)insertedConnections;
   std::map<cmStdString, const cmTarget* >::const_iterator targetPtrIt =
                                              this->TargetPtrs.find(targetName);
 
@@ -386,45 +355,7 @@ void cmGraphVizWriter::WriteDependerConnections(const char* targetName,
 
     // Now we have a target, check whether it links against targetName.
     // If so, draw a connection, and then continue with dependers on that one.
-    const cmTarget::LinkLibraryVectorType* ll =
-                            &(dependerIt->second->GetOriginalLinkLibraries());
 
-    for (cmTarget::LinkLibraryVectorType::const_iterator llit = ll->begin();
-         llit != ll->end();
-         ++ llit )
-      {
-      std::string libName = llit->first.c_str();
-      if (libName == targetName)
-        {
-        // So this target links against targetName.
-        std::map<cmStdString, cmStdString>::const_iterator dependerNodeNameIt =
-                                this->TargetNamesNodes.find(dependerIt->first);
-
-        if(dependerNodeNameIt != this->TargetNamesNodes.end())
-          {
-          std::string connectionName = dependerNodeNameIt->second;
-          connectionName += "-";
-          connectionName += myNodeName;
-
-          if (insertedConnections.find(connectionName) ==
-                                                     insertedConnections.end())
-            {
-            insertedConnections.insert(connectionName);
-            this->WriteNode(dependerIt->first.c_str(), dependerIt->second,
-                            insertedNodes, str);
-
-            str << "    \"" << dependerNodeNameIt->second << "\" -> \""
-                << myNodeName << "\"";
-            str << " // " <<targetName<< " -> " <<dependerIt->first<<std::endl;
-            this->WriteDependerConnections(dependerIt->first.c_str(),
-                                      insertedNodes, insertedConnections, str);
-            }
-
-
-          }
-        break;
-        }
-      }
     }
 
 }
@@ -513,31 +444,6 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt)
         // Skip ignored targets
         continue;
         }
-      const cmTarget::LinkLibraryVectorType* ll =
-                                     &(tit->second.GetOriginalLinkLibraries());
-      for (cmTarget::LinkLibraryVectorType::const_iterator llit = ll->begin();
-           llit != ll->end();
-           ++ llit )
-        {
-        const char* libName = llit->first.c_str();
-        if (this->IgnoreThisTarget(libName))
-          {
-          // Skip ignored targets
-          continue;
-          }
-
-        std::map<cmStdString, const cmTarget*>::const_iterator tarIt =
-                                                this->TargetPtrs.find(libName);
-        if ( tarIt == this->TargetPtrs.end() )
-          {
-          cmOStringStream ostr;
-          ostr << this->GraphNodePrefix << cnt++;
-          this->TargetNamesNodes[libName] = ostr.str();
-          this->TargetPtrs[libName] = NULL;
-          // str << "    \"" << ostr.c_str() << "\" [ label=\"" << libName
-          // <<  "\" shape=\"ellipse\"];" << std::endl;
-          }
-        }
       }
     }
    return cnt;
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 5d42205..bd2c06d 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -1083,81 +1083,6 @@ void cmLocalVisualStudio6Generator
       libMultiLineOptionsForDebug += " \n";
       }
     }
-  // find link libraries
-  const cmTarget::LinkLibraryVectorType& libs = target.GetLinkLibraries();
-  cmTarget::LinkLibraryVectorType::const_iterator j;
-  for(j = libs.begin(); j != libs.end(); ++j)
-    {
-    // add libraries to executables and dlls (but never include
-    // a library in a library, bad recursion)
-    // NEVER LINK STATIC LIBRARIES TO OTHER STATIC LIBRARIES
-    if ((target.GetType() != cmTarget::SHARED_LIBRARY
-         && target.GetType() != cmTarget::STATIC_LIBRARY
-         && target.GetType() != cmTarget::MODULE_LIBRARY) ||
-        (target.GetType()==cmTarget::SHARED_LIBRARY
-         && libName != GetVS6TargetName(j->first)) ||
-        (target.GetType()==cmTarget::MODULE_LIBRARY
-         && libName != GetVS6TargetName(j->first)))
-      {
-      // Compute the proper name to use to link this library.
-      std::string lib;
-      std::string libDebug;
-      cmGeneratorTarget* tgt =
-          this->GlobalGenerator->FindGeneratorTarget(0, j->first.c_str());
-      if(tgt)
-        {
-        lib = cmSystemTools::GetFilenameWithoutExtension
-          (tgt->GetFullName().c_str());
-        libDebug = cmSystemTools::GetFilenameWithoutExtension
-          (tgt->GetFullName("Debug").c_str());
-        lib += ".lib";
-        libDebug += ".lib";
-        }
-      else
-        {
-        lib = j->first.c_str();
-        libDebug = j->first.c_str();
-        if(j->first.find(".lib") == std::string::npos)
-          {
-          lib += ".lib";
-          libDebug += ".lib";
-          }
-        }
-      lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str());
-      libDebug =
-        this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str());
-
-      if (j->second == cmTarget::GENERAL)
-        {
-        libOptions += " ";
-        libOptions += lib;
-        libMultiLineOptions += "# ADD LINK32 ";
-        libMultiLineOptions +=  lib;
-        libMultiLineOptions += "\n";
-        libMultiLineOptionsForDebug += "# ADD LINK32 ";
-        libMultiLineOptionsForDebug +=  libDebug;
-        libMultiLineOptionsForDebug += "\n";
-        }
-      if (j->second == cmTarget::DEBUG)
-        {
-        libDebugOptions += " ";
-        libDebugOptions += lib;
-
-        libMultiLineDebugOptions += "# ADD LINK32 ";
-        libMultiLineDebugOptions += libDebug;
-        libMultiLineDebugOptions += "\n";
-        }
-      if (j->second == cmTarget::OPTIMIZED)
-        {
-        libOptimizedOptions += " ";
-        libOptimizedOptions += lib;
-
-        libMultiLineOptimizedOptions += "# ADD LINK32 ";
-        libMultiLineOptimizedOptions += lib;
-        libMultiLineOptimizedOptions += "\n";
-        }
-      }
-    }
 #endif
 
   // Get include options for this target.
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 479e712..c78d41d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1488,7 +1488,7 @@ void cmMakefile::AddLinkLibraryForTarget(const char *target,
         this->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
         }
       }
-    i->second.AddLinkLibrary( *this, target, lib, llt );
+    i->second.AddLinkLibrary( target, lib, llt );
     }
   else
     {
@@ -1991,7 +1991,7 @@ void cmMakefile::AddGlobalLinkInformation(const char* name, cmTarget& target)
     {
     target.AddLinkDirectory(j->c_str());
     }
-  target.MergeLinkLibraries( *this, name, this->LinkLibraries );
+  target.MergeLinkLibraries( name, this->LinkLibraries );
 }
 
 
@@ -2018,10 +2018,6 @@ cmTarget* cmMakefile::AddLibrary(const char* lname, cmTarget::TargetType type,
     }
 
   cmTarget* target = this->AddNewTarget(type, lname);
-  // Clear its dependencies. Otherwise, dependencies might persist
-  // over changes in CMakeLists.txt, making the information stale and
-  // hence useless.
-  target->ClearDependencyInformation( *this, lname );
   if(excludeFromAll)
     {
     target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6c014bc..324cb5c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -162,7 +162,6 @@ cmTarget::cmTarget()
 #undef INITIALIZE_TARGET_POLICY_MEMBER
 
   this->Makefile = 0;
-  this->LinkLibrariesAnalyzed = false;
   this->HaveInstallRule = false;
   this->DLLPlatform = false;
   this->IsApple = false;
@@ -373,9 +372,6 @@ void cmTarget::FinishConfigure()
   // system generation uses up-to-date information even if other cache
   // invalidation code in this source file is buggy.
   this->ClearLinkMaps();
-
-  // Do old-style link dependency analysis.
-  this->AnalyzeLibDependencies(*this->Makefile);
 }
 
 //----------------------------------------------------------------------------
@@ -653,8 +649,7 @@ void cmTarget::ConstructSourceFileFlags() const
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::MergeLinkLibraries( cmMakefile& mf,
-                                   const char *selfname,
+void cmTarget::MergeLinkLibraries( const char *selfname,
                                    const LinkLibraryVectorType& libs )
 {
   // Only add on libraries we haven't added on before.
@@ -664,7 +659,7 @@ void cmTarget::MergeLinkLibraries( cmMakefile& mf,
   for( ; i != libs.end(); ++i )
     {
     // This is equivalent to the target_link_libraries plain signature.
-    this->AddLinkLibrary( mf, selfname, i->first.c_str(), i->second );
+    this->AddLinkLibrary( selfname, i->first.c_str(), i->second );
     this->AppendProperty("INTERFACE_LINK_LIBRARIES",
       this->GetDebugGeneratorExpressions(i->first.c_str(), i->second).c_str());
     }
@@ -716,34 +711,6 @@ cmTarget::LinkLibraryType cmTarget::ComputeLinkType(const char* config) const
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::ClearDependencyInformation( cmMakefile& mf,
-                                           const char* target )
-{
-  // Clear the dependencies. The cache variable must exist iff we are
-  // recording dependency information for this target.
-  std::string depname = target;
-  depname += "_LIB_DEPENDS";
-  if (this->RecordDependencies)
-    {
-    mf.AddCacheDefinition(depname.c_str(), "",
-                          "Dependencies for target", cmCacheManager::STATIC);
-    }
-  else
-    {
-    if (mf.GetDefinition( depname.c_str() ))
-      {
-      std::string message = "Target ";
-      message += target;
-      message += " has dependency information when it shouldn't.\n";
-      message += "Your cache is probably stale. Please remove the entry\n  ";
-      message += depname;
-      message += "\nfrom the cache.";
-      cmSystemTools::Error( message.c_str() );
-      }
-    }
-}
-
-//----------------------------------------------------------------------------
 bool cmTarget::NameResolvesToFramework(const std::string& libname) const
 {
   return this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
@@ -846,8 +813,7 @@ void cmTarget::GetTllSignatureTraces(cmOStringStream &s,
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::AddLinkLibrary(cmMakefile& mf,
-                              const char *target, const char* lib,
+void cmTarget::AddLinkLibrary(const char *target, const char* lib,
                               LinkLibraryType llt)
 {
   cmTarget *tgt = this->Makefile->FindTargetToUse(lib);
@@ -872,48 +838,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
   cmTarget::LibraryID tmp;
   tmp.first = lib;
   tmp.second = llt;
-  this->LinkLibraries.push_back( tmp );
-  this->OriginalLinkLibraries.push_back(tmp);
   this->ClearLinkMaps();
-
-  // Add the explicit dependency information for this target. This is
-  // simply a set of libraries separated by ";". There should always
-  // be a trailing ";". These library names are not canonical, in that
-  // they may be "-framework x", "-ly", "/path/libz.a", etc.
-  // We shouldn't remove duplicates here because external libraries
-  // may be purposefully duplicated to handle recursive dependencies,
-  // and we removing one instance will break the link line. Duplicates
-  // will be appropriately eliminated at emit time.
-  if(this->RecordDependencies)
-    {
-    std::string targetEntry = target;
-    targetEntry += "_LIB_DEPENDS";
-    std::string dependencies;
-    const char* old_val = mf.GetDefinition( targetEntry.c_str() );
-    if( old_val )
-      {
-      dependencies += old_val;
-      }
-    switch (llt)
-      {
-      case cmTarget::GENERAL:
-        dependencies += "general";
-        break;
-      case cmTarget::DEBUG:
-        dependencies += "debug";
-        break;
-      case cmTarget::OPTIMIZED:
-        dependencies += "optimized";
-        break;
-      }
-    dependencies += ";";
-    dependencies += lib;
-    dependencies += ";";
-    mf.AddCacheDefinition( targetEntry.c_str(), dependencies.c_str(),
-                           "Dependencies for the target",
-                           cmCacheManager::STATIC );
-    }
-
 }
 
 //----------------------------------------------------------------------------
@@ -939,147 +864,6 @@ cmTarget::AddSystemIncludeDirectories(const std::vector<std::string> &incs)
 }
 
 //----------------------------------------------------------------------------
-void
-cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
-{
-  // There are two key parts of the dependency analysis: (1)
-  // determining the libraries in the link line, and (2) constructing
-  // the dependency graph for those libraries.
-  //
-  // The latter is done using the cache entries that record the
-  // dependencies of each library.
-  //
-  // The former is a more thorny issue, since it is not clear how to
-  // determine if two libraries listed on the link line refer to the a
-  // single library or not. For example, consider the link "libraries"
-  //    /usr/lib/libtiff.so -ltiff
-  // Is this one library or two? The solution implemented here is the
-  // simplest (and probably the only practical) one: two libraries are
-  // the same if their "link strings" are identical. Thus, the two
-  // libraries above are considered distinct. This also means that for
-  // dependency analysis to be effective, the CMake user must specify
-  // libraries build by his project without using any linker flags or
-  // file extensions. That is,
-  //    LINK_LIBRARIES( One Two )
-  // instead of
-  //    LINK_LIBRARIES( -lOne ${binarypath}/libTwo.a )
-  // The former is probably what most users would do, but it never
-  // hurts to document the assumptions. :-) Therefore, in the analysis
-  // code, the "canonical name" of a library is simply its name as
-  // given to a LINK_LIBRARIES command.
-  //
-  // Also, we will leave the original link line intact; we will just add any
-  // dependencies that were missing.
-  //
-  // There is a problem with recursive external libraries
-  // (i.e. libraries with no dependency information that are
-  // recursively dependent). We must make sure that the we emit one of
-  // the libraries twice to satisfy the recursion, but we shouldn't
-  // emit it more times than necessary. In particular, we must make
-  // sure that handling this improbable case doesn't cost us when
-  // dealing with the common case of non-recursive libraries. The
-  // solution is to assume that the recursion is satisfied at one node
-  // of the dependency tree. To illustrate, assume libA and libB are
-  // extrenal and mutually dependent. Suppose libX depends on
-  // libA, and libY on libA and libX. Then
-  //   TARGET_LINK_LIBRARIES( Y X A B A )
-  //   TARGET_LINK_LIBRARIES( X A B A )
-  //   TARGET_LINK_LIBRARIES( Exec Y )
-  // would result in "-lY -lX -lA -lB -lA". This is the correct way to
-  // specify the dependencies, since the mutual dependency of A and B
-  // is resolved *every time libA is specified*.
-  //
-  // Something like
-  //   TARGET_LINK_LIBRARIES( Y X A B A )
-  //   TARGET_LINK_LIBRARIES( X A B )
-  //   TARGET_LINK_LIBRARIES( Exec Y )
-  // would result in "-lY -lX -lA -lB", and the mutual dependency
-  // information is lost. This is because in some case (Y), the mutual
-  // dependency of A and B is listed, while in another other case (X),
-  // it is not. Depending on which line actually emits A, the mutual
-  // dependency may or may not be on the final link line.  We can't
-  // handle this pathalogical case cleanly without emitting extra
-  // libraries for the normal cases. Besides, the dependency
-  // information for X is wrong anyway: if we build an executable
-  // depending on X alone, we would not have the mutual dependency on
-  // A and B resolved.
-  //
-  // IMPROVEMENTS:
-  // -- The current algorithm will not always pick the "optimal" link line
-  //    when recursive dependencies are present. It will instead break the
-  //    cycles at an aribtrary point. The majority of projects won't have
-  //    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);
-   }
- }
-
- // The dependency map.
- DependencyMap dep_map;
-
- // 1. Build the dependency graph
- //
- for(LinkLibraryVectorType::reverse_iterator lib
-       = this->LinkLibraries.rbegin();
-     lib != this->LinkLibraries.rend(); ++lib)
-   {
-   this->GatherDependencies( mf, *lib, dep_map);
-   }
-
- // 2. Remove any dependencies that are already satisfied in the original
- // link line.
- //
- for(LinkLibraryVectorType::iterator lib = this->LinkLibraries.begin();
-     lib != this->LinkLibraries.end(); ++lib)
-   {
-   for( LinkLibraryVectorType::iterator lib2 = lib;
-        lib2 != this->LinkLibraries.end(); ++lib2)
-     {
-     this->DeleteDependency( dep_map, *lib, *lib2);
-     }
-   }
-
-
- // 3. Create the new link line by simply emitting any dependencies that are
- // missing.  Start from the back and keep adding.
- //
- std::set<DependencyMap::key_type> done, visited;
- std::vector<DependencyMap::key_type> newLinkLibraries;
- for(LinkLibraryVectorType::reverse_iterator lib =
-       this->LinkLibraries.rbegin();
-     lib != this->LinkLibraries.rend(); ++lib)
-   {
-   // skip zero size library entries, this may happen
-   // if a variable expands to nothing.
-   if (lib->first.size() != 0)
-     {
-     this->Emit( *lib, dep_map, done, visited, newLinkLibraries );
-     }
-   }
-
- // 4. Add the new libraries to the link line.
- //
- for( std::vector<DependencyMap::key_type>::reverse_iterator k =
-        newLinkLibraries.rbegin();
-      k != newLinkLibraries.rend(); ++k )
-   {
-   // get the llt from the dep_map
-   this->LinkLibraries.push_back( std::make_pair(k->first,k->second) );
-   }
- this->LinkLibrariesAnalyzed = true;
-}
-
-//----------------------------------------------------------------------------
 void cmTarget::InsertDependency( DependencyMap& depMap,
                                  const LibraryID& lib,
                                  const LibraryID& dep)
@@ -1172,66 +956,6 @@ void cmTarget::Emit(const LibraryID lib,
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::GatherDependencies( const cmMakefile& mf,
-                                   const LibraryID& lib,
-                                   DependencyMap& dep_map)
-{
-  // If the library is already in the dependency map, then it has
-  // already been fully processed.
-  if( dep_map.find(lib) != dep_map.end() )
-    {
-    return;
-    }
-
-  const char* deps = mf.GetDefinition( (lib.first+"_LIB_DEPENDS").c_str() );
-  if( deps && strcmp(deps,"") != 0 )
-    {
-    // Make sure this library is in the map, even if it has an empty
-    // set of dependencies. This distinguishes the case of explicitly
-    // no dependencies with that of unspecified dependencies.
-    dep_map[lib];
-
-    // Parse the dependency information, which is a set of
-    // type, library pairs separated by ";". There is always a trailing ";".
-    cmTarget::LinkLibraryType llt = cmTarget::GENERAL;
-    std::string depline = deps;
-    std::string::size_type start = 0;
-    std::string::size_type end;
-    end = depline.find( ";", start );
-    while( end != std::string::npos )
-      {
-      std::string l = depline.substr( start, end-start );
-      if( l.size() != 0 )
-        {
-        if (l == "debug")
-          {
-          llt = cmTarget::DEBUG;
-          }
-        else if (l == "optimized")
-          {
-          llt = cmTarget::OPTIMIZED;
-          }
-        else if (l == "general")
-          {
-          llt = cmTarget::GENERAL;
-          }
-        else
-          {
-          LibraryID lib2(l,llt);
-          this->InsertDependency( dep_map, lib, lib2);
-          this->GatherDependencies( mf, lib2, dep_map);
-          llt = cmTarget::GENERAL;
-          }
-        }
-      start = end+1; // skip the ;
-      end = depline.find( ";", start );
-      }
-    // cannot depend on itself
-    this->DeleteDependency( dep_map, lib, lib);
-    }
-}
-
-//----------------------------------------------------------------------------
 static bool whiteListedInterfaceProperty(const char *prop)
 {
   if(cmHasLiteralPrefix(prop, "INTERFACE_"))
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 22ec7e7..2d95949 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -168,23 +168,13 @@ public:
   typedef std::pair<cmStdString, LinkLibraryType> LibraryID;
 
   typedef std::vector<LibraryID > LinkLibraryVectorType;
-  const LinkLibraryVectorType &GetLinkLibraries() const {
-  return this->LinkLibraries;}
-  const LinkLibraryVectorType &GetOriginalLinkLibraries() const
-    {return this->OriginalLinkLibraries;}
 
   /** Compute the link type to use for the given configuration.  */
   LinkLibraryType ComputeLinkType(const char* config) const;
 
-  /**
-   * Clear the dependency information recorded for this target, if any.
-   */
-  void ClearDependencyInformation(cmMakefile& mf, const char* target);
-
   // Check to see if a library is a framework and treat it different on Mac
   bool NameResolvesToFramework(const std::string& libname) const;
-  void AddLinkLibrary(cmMakefile& mf,
-                      const char *target, const char* lib,
+  void AddLinkLibrary(const char *target, const char* lib,
                       LinkLibraryType llt);
   enum TLLSignature {
     KeywordTLLSignature,
@@ -193,7 +183,7 @@ public:
   bool PushTLLCommandTrace(TLLSignature signature);
   void GetTllSignatureTraces(cmOStringStream &s, TLLSignature sig) const;
 
-  void MergeLinkLibraries( cmMakefile& mf, const char* selfname,
+  void MergeLinkLibraries( const char* selfname,
                            const LinkLibraryVectorType& libs );
 
   const std::vector<std::string>& GetLinkDirectories() const;
@@ -440,16 +430,6 @@ private:
              std::set<LibraryID>& visited,
              DependencyList& link_line);
 
-  /**
-   * Finds the dependencies for \a lib and inserts them into \a
-   * dep_map.
-   */
-  void GatherDependencies( const cmMakefile& mf,
-                           const LibraryID& lib,
-                           DependencyMap& dep_map);
-
-  void AnalyzeLibDependencies( const cmMakefile& mf );
-
   const char* GetSuffixVariableInternal(bool implib) const;
   const char* GetPrefixVariableInternal(bool implib) const;
 
@@ -473,9 +453,7 @@ private:
   TargetType TargetTypeValue;
   std::vector<cmSourceFile*> SourceFiles;
   std::vector<std::string> ObjectLibraries;
-  LinkLibraryVectorType LinkLibraries;
   LinkLibraryVectorType PrevLinkedLibraries;
-  bool LinkLibrariesAnalyzed;
   std::vector<std::string> LinkDirectories;
   std::set<cmStdString> LinkDirectoriesEmmitted;
   bool HaveInstallRule;
@@ -485,7 +463,6 @@ private:
   std::set<cmStdString> Utilities;
   bool RecordDependencies;
   mutable cmPropertyMap Properties;
-  LinkLibraryVectorType OriginalLinkLibraries;
   bool DLLPlatform;
   bool IsApple;
   bool IsImportedTarget;
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index fcde44d..2824ebc 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -398,6 +398,3 @@ endif()
 #
 add_subdirectory(Library)
 add_subdirectory(Executable)
-subdir_depends(Executable Library)
-export_library_dependencies(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake)
-include(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL)
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index a4a0e0e..0f9a71d 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -368,6 +368,3 @@ endif()
 #
 add_subdirectory(Library)
 add_subdirectory(Executable)
-subdir_depends(Executable Library)
-export_library_dependencies(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake)
-include(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt
deleted file mode 100644
index 8d210aa..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error at CMP0033-NEW.cmake:2 \(export_library_dependencies\):
-  The export_library_dependencies command should not be called; see CMP0033.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake
deleted file mode 100644
index 6f90f29..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-NEW.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-cmake_policy(SET CMP0033 NEW)
-export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt
deleted file mode 100644
index e5dd2dd..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD-stderr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-CMake Error at CMP0033-OLD.cmake:2 \(export_library_dependencies\):
-  export_library_dependencies called with incorrect number of arguments
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake
deleted file mode 100644
index a3504b6..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-OLD.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-cmake_policy(SET CMP0033 OLD)
-export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt
deleted file mode 100644
index e561dac..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN-stderr.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-CMake Warning \(dev\) at CMP0033-WARN.cmake:1 \(export_library_dependencies\):
-  Policy CMP0033 is not set: The export_library_dependencies command should
-  not be called.  Run "cmake --help-policy CMP0033" for policy details.  Use
-  the cmake_policy command to set the policy and suppress this warning.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
-This warning is for project developers.  Use -Wno-dev to suppress it.
-
-CMake Error at CMP0033-WARN.cmake:1 \(export_library_dependencies\):
-  export_library_dependencies called with incorrect number of arguments
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake b/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake
deleted file mode 100644
index f897ddd..0000000
--- a/Tests/RunCMake/DisallowedCommands/CMP0033-WARN.cmake
+++ /dev/null
@@ -1 +0,0 @@
-export_library_dependencies()
diff --git a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
index 208ea20..af348f8 100644
--- a/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
+++ b/Tests/RunCMake/DisallowedCommands/RunCMakeTest.cmake
@@ -5,7 +5,6 @@ foreach(p
     CMP0030
     CMP0031
     CMP0032
-    CMP0033
     CMP0034
     CMP0035
     CMP0036

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16ca91bbd70fc64376df2681fcfa66dfd576eba9
commit 16ca91bbd70fc64376df2681fcfa66dfd576eba9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 10 11:04:20 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:06 2014 +0100

    Move GetOutputName to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 98f12e3..3f3155e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -605,7 +605,7 @@ std::string cmGeneratorTarget::GetCFBundleDirectory(const char* config,
                                            bool contentOnly) const
 {
   std::string fpath;
-  fpath += this->Target->GetOutputName(config, false);
+  fpath += this->GetOutputName(config, false);
   fpath += ".";
   const char *ext = this->GetProperty("BUNDLE_EXTENSION");
   if (!ext)
@@ -649,7 +649,7 @@ std::string cmGeneratorTarget::GetFrameworkDirectory(const char* config,
                                                      bool rootDir) const
 {
   std::string fpath;
-  fpath += this->Target->GetOutputName(config, false);
+  fpath += this->GetOutputName(config, false);
   fpath += ".framework";
   if(!rootDir)
     {
@@ -3539,7 +3539,7 @@ void cmGeneratorTarget::GetFullNameInternal(const char* config,
   std::string fw_prefix;
   if(this->Target->IsFrameworkOnApple())
     {
-    fw_prefix = this->Target->GetOutputName(config, false);
+    fw_prefix = this->GetOutputName(config, false);
     fw_prefix += ".framework/";
     targetPrefix = fw_prefix.c_str();
     targetSuffix = 0;
@@ -3547,7 +3547,7 @@ void cmGeneratorTarget::GetFullNameInternal(const char* config,
 
   if(this->Target->IsCFBundleOnApple())
     {
-    fw_prefix = this->Target->GetOutputName(config, false);
+    fw_prefix = this->GetOutputName(config, false);
     fw_prefix += ".";
     const char *ext = this->GetProperty("BUNDLE_EXTENSION");
     if (!ext)
@@ -3564,7 +3564,7 @@ void cmGeneratorTarget::GetFullNameInternal(const char* config,
   outPrefix = targetPrefix?targetPrefix:"";
 
   // Append the target name or property-specified name.
-  outBase += this->Target->GetOutputName(config, implib);
+  outBase += this->GetOutputName(config, implib);
 
   // Append the per-configuration postfix.
   outBase += configPostfix?configPostfix:"";
@@ -3792,6 +3792,44 @@ bool cmGeneratorTarget::HaveInstallTreeRPATH() const
 }
 
 //----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetOutputName(const char* config,
+                                             bool implib) const
+{
+  std::vector<std::string> props;
+  std::string type = this->Target->GetOutputTargetType(implib);
+  std::string configUpper = cmSystemTools::UpperCase(config? config : "");
+  if(!type.empty() && !configUpper.empty())
+    {
+    // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME_<CONFIG>
+    props.push_back(type + "_OUTPUT_NAME_" + configUpper);
+    }
+  if(!type.empty())
+    {
+    // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME
+    props.push_back(type + "_OUTPUT_NAME");
+    }
+  if(!configUpper.empty())
+    {
+    // OUTPUT_NAME_<CONFIG>
+    props.push_back("OUTPUT_NAME_" + configUpper);
+    // <CONFIG>_OUTPUT_NAME
+    props.push_back(configUpper + "_OUTPUT_NAME");
+    }
+  // OUTPUT_NAME
+  props.push_back("OUTPUT_NAME");
+
+  for(std::vector<std::string>::const_iterator i = props.begin();
+      i != props.end(); ++i)
+    {
+    if(const char* outName = this->GetProperty(i->c_str()))
+      {
+      return outName;
+      }
+    }
+  return this->GetName();
+}
+
+//----------------------------------------------------------------------------
 void cmGeneratorTarget::GetDirectLinkLibraries(const char *config,
                             std::vector<std::string> &libs,
                             cmTarget const* head) const
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index ab089d6..9795a00 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -333,6 +333,8 @@ public:
                               std::vector<std::string> &,
                               cmTarget *head) const;
 
+  std::string GetOutputName(const char* config, bool implib) const;
+
 private:
   friend class cmTargetTraceDependencies;
   struct SourceEntry { std::vector<cmSourceFile*> Depends; };
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6c15168..6c014bc 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2637,43 +2637,6 @@ bool cmTarget::UsesDefaultOutputDir(const char* config, bool implib) const
 }
 
 //----------------------------------------------------------------------------
-std::string cmTarget::GetOutputName(const char* config, bool implib) const
-{
-  std::vector<std::string> props;
-  std::string type = this->GetOutputTargetType(implib);
-  std::string configUpper = cmSystemTools::UpperCase(config? config : "");
-  if(!type.empty() && !configUpper.empty())
-    {
-    // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME_<CONFIG>
-    props.push_back(type + "_OUTPUT_NAME_" + configUpper);
-    }
-  if(!type.empty())
-    {
-    // <ARCHIVE|LIBRARY|RUNTIME>_OUTPUT_NAME
-    props.push_back(type + "_OUTPUT_NAME");
-    }
-  if(!configUpper.empty())
-    {
-    // OUTPUT_NAME_<CONFIG>
-    props.push_back("OUTPUT_NAME_" + configUpper);
-    // <CONFIG>_OUTPUT_NAME
-    props.push_back(configUpper + "_OUTPUT_NAME");
-    }
-  // OUTPUT_NAME
-  props.push_back("OUTPUT_NAME");
-
-  for(std::vector<std::string>::const_iterator i = props.begin();
-      i != props.end(); ++i)
-    {
-    if(const char* outName = this->GetProperty(i->c_str()))
-      {
-      return outName;
-      }
-    }
-  return this->GetName();
-}
-
-//----------------------------------------------------------------------------
 std::string cmTarget::GetFrameworkVersion() const
 {
   assert(this->GetType() != INTERFACE_LIBRARY);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 4dc4575..22ec7e7 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -460,9 +460,6 @@ private:
   // Returns ARCHIVE, LIBRARY, or RUNTIME based on platform and type.
   const char* GetOutputTargetType(bool implib) const;
 
-  // Get the target base name.
-  std::string GetOutputName(const char* config, bool implib) const;
-
   std::string GetFullNameImported(const char* config, bool implib) const;
 
   std::string ImportedGetFullPath(const char* config, bool implib) const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c1180c93a7680a3547dcac0b1981f665083a898
commit 7c1180c93a7680a3547dcac0b1981f665083a898
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 10 10:57:56 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:06 2014 +0100

    Move link libraries methods to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a17d4c7..98f12e3 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -119,13 +119,6 @@ const char *cmGeneratorTarget::GetProperty(const char *prop) const
   return this->Target->GetProperty(prop);
 }
 
-void cmGeneratorTarget::GetDirectLinkLibraries(const char *config,
-                            std::vector<std::string> &libs,
-                            cmTarget *head) const
-{
-  this->Target->GetDirectLinkLibraries(config, libs, head);
-}
-
 //----------------------------------------------------------------------------
 std::vector<cmSourceFile*> const*
 cmGeneratorTarget::GetSourceDepends(cmSourceFile* sf) const
@@ -885,7 +878,7 @@ void cmGeneratorTarget::ComputeLinkImplementation(const char* config,
 
   // Collect libraries directly linked in this configuration.
   std::vector<std::string> llibs;
-  this->Target->GetDirectLinkLibraries(config, llibs, head);
+  this->GetDirectLinkLibraries(config, llibs, head);
   for(std::vector<std::string>::const_iterator li = llibs.begin();
       li != llibs.end(); ++li)
     {
@@ -3797,3 +3790,60 @@ bool cmGeneratorTarget::HaveInstallTreeRPATH() const
   return (install_rpath && *install_rpath) &&
           !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
 }
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::GetDirectLinkLibraries(const char *config,
+                            std::vector<std::string> &libs,
+                            cmTarget const* head) const
+{
+  const char *prop = this->GetProperty("LINK_LIBRARIES");
+  if (prop)
+    {
+    cmListFileBacktrace lfbt;
+    cmGeneratorExpression ge(lfbt);
+    const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
+
+    cmGeneratorExpressionDAGChecker dagChecker(lfbt,
+                                        this->GetName(),
+                                        "LINK_LIBRARIES", 0, 0);
+    cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile,
+                                        config,
+                                        false,
+                                        head,
+                                        &dagChecker),
+                                      libs);
+
+    std::set<cmStdString> seenProps = cge->GetSeenTargetProperties();
+    for (std::set<cmStdString>::const_iterator it = seenProps.begin();
+        it != seenProps.end(); ++it)
+      {
+      if (!this->GetProperty(it->c_str()))
+        {
+        this->Target->LinkImplicitNullProperties.insert(*it);
+        }
+      }
+    }
+}
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::GetInterfaceLinkLibraries(const char *config,
+                        std::vector<std::string> &libs, cmTarget *head) const
+{
+  const char *prop = this->GetProperty("INTERFACE_LINK_LIBRARIES");
+  if (prop)
+    {
+    cmListFileBacktrace lfbt;
+    cmGeneratorExpression ge(lfbt);
+    const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
+
+    cmGeneratorExpressionDAGChecker dagChecker(lfbt,
+                                        this->GetName(),
+                                        "INTERFACE_LINK_LIBRARIES", 0, 0);
+    cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile,
+                                        config,
+                                        false,
+                                        head,
+                                        &dagChecker),
+                                      libs);
+    }
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 389cb93..ab089d6 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -191,10 +191,6 @@ public:
   /** Get the include directories for this target.  */
   std::vector<std::string> GetIncludeDirectories(const char *config) const;
 
-  void GetDirectLinkLibraries(const char *config,
-                              std::vector<std::string> &libs,
-                              cmTarget *head) const;
-
   bool IsSystemIncludeDirectory(const char *dir, const char *config) const;
 
   /** Add the target output files to the global generator manifest.  */
@@ -330,6 +326,13 @@ public:
   bool HaveBuildTreeRPATH(const char *config) const;
   bool HaveInstallTreeRPATH() const;
 
+  void GetDirectLinkLibraries(const char *config,
+                              std::vector<std::string> &,
+                              cmTarget const* head) const;
+  void GetInterfaceLinkLibraries(const char *config,
+                              std::vector<std::string> &,
+                              cmTarget *head) const;
+
 private:
   friend class cmTargetTraceDependencies;
   struct SourceEntry { std::vector<cmSourceFile*> Depends; };
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a2709a7..6c15168 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -751,64 +751,6 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname) const
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::GetDirectLinkLibraries(const char *config,
-                            std::vector<std::string> &libs,
-                            cmTarget const* head) const
-{
-  const char *prop = this->GetProperty("LINK_LIBRARIES");
-  if (prop)
-    {
-    cmListFileBacktrace lfbt;
-    cmGeneratorExpression ge(lfbt);
-    const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
-
-    cmGeneratorExpressionDAGChecker dagChecker(lfbt,
-                                        this->GetName(),
-                                        "LINK_LIBRARIES", 0, 0);
-    cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile,
-                                        config,
-                                        false,
-                                        head,
-                                        &dagChecker),
-                                      libs);
-
-    std::set<cmStdString> seenProps = cge->GetSeenTargetProperties();
-    for (std::set<cmStdString>::const_iterator it = seenProps.begin();
-        it != seenProps.end(); ++it)
-      {
-      if (!this->GetProperty(it->c_str()))
-        {
-        this->LinkImplicitNullProperties.insert(*it);
-        }
-      }
-    }
-}
-
-//----------------------------------------------------------------------------
-void cmTarget::GetInterfaceLinkLibraries(const char *config,
-                                         std::vector<std::string> &libs,
-                                         cmTarget const* head) const
-{
-  const char *prop = this->GetProperty("INTERFACE_LINK_LIBRARIES");
-  if (prop)
-    {
-    cmListFileBacktrace lfbt;
-    cmGeneratorExpression ge(lfbt);
-    const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(prop);
-
-    cmGeneratorExpressionDAGChecker dagChecker(lfbt,
-                                        this->GetName(),
-                                        "INTERFACE_LINK_LIBRARIES", 0, 0);
-    cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile,
-                                        config,
-                                        false,
-                                        head,
-                                        &dagChecker),
-                                      libs);
-    }
-}
-
-//----------------------------------------------------------------------------
 std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value,
                                   cmTarget::LinkLibraryType llt) const
 {
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index a352d64..4dc4575 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -172,12 +172,6 @@ public:
   return this->LinkLibraries;}
   const LinkLibraryVectorType &GetOriginalLinkLibraries() const
     {return this->OriginalLinkLibraries;}
-  void GetDirectLinkLibraries(const char *config,
-                              std::vector<std::string> &,
-                              cmTarget const* head) const;
-  void GetInterfaceLinkLibraries(const char *config,
-                              std::vector<std::string> &,
-                              cmTarget const* head) const;
 
   /** Compute the link type to use for the given configuration.  */
   LinkLibraryType ComputeLinkType(const char* config) const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccd0e64f4663fad2576e8ad6180ba8c7616c7261
commit ccd0e64f4663fad2576e8ad6180ba8c7616c7261
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 10 10:54:42 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:05 2014 +0100

    Port cmComputeTargetDepends to cmGeneratorTarget.

diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 74b13e4..53f098c 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -16,7 +16,7 @@
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
 #include "cmSystemTools.h"
-#include "cmTarget.h"
+#include "cmGeneratorTarget.h"
 #include "cmake.h"
 
 #include <algorithm>
@@ -143,12 +143,12 @@ bool cmComputeTargetDepends::Compute()
 
 //----------------------------------------------------------------------------
 void
-cmComputeTargetDepends::GetTargetDirectDepends(cmTarget const* t,
+cmComputeTargetDepends::GetTargetDirectDepends(cmGeneratorTarget const* t,
                                                cmTargetDependSet& deps)
 {
   // Lookup the index for this target.  All targets should be known by
   // this point.
-  std::map<cmTarget const*, int>::const_iterator tii
+  std::map<cmGeneratorTarget const*, int>::const_iterator tii
                                                   = this->TargetIndex.find(t);
   assert(tii != this->TargetIndex.end());
   int i = tii->second;
@@ -157,7 +157,7 @@ cmComputeTargetDepends::GetTargetDirectDepends(cmTarget const* t,
   EdgeList const& nl = this->FinalGraph[i];
   for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
     {
-    cmTarget const* dep = this->Targets[*ni];
+    cmGeneratorTarget const* dep = this->Targets[*ni];
     cmTargetDependSet::iterator di = deps.insert(dep).first;
     di->SetType(ni->IsStrong());
     }
@@ -171,11 +171,12 @@ void cmComputeTargetDepends::CollectTargets()
     this->GlobalGenerator->GetLocalGenerators();
   for(unsigned int i = 0; i < lgens.size(); ++i)
     {
-    const cmTargets& targets = lgens[i]->GetMakefile()->GetTargets();
-    for(cmTargets::const_iterator ti = targets.begin();
+    const cmGeneratorTargetsType& targets = lgens[i]->GetMakefile()
+                                                    ->GetGeneratorTargets();
+    for(cmGeneratorTargetsType::const_iterator ti = targets.begin();
         ti != targets.end(); ++ti)
       {
-      cmTarget const* target = &ti->second;
+      cmGeneratorTarget const* target = ti->second;
       int index = static_cast<int>(this->Targets.size());
       this->TargetIndex[target] = index;
       this->Targets.push_back(target);
@@ -200,7 +201,7 @@ void cmComputeTargetDepends::CollectDepends()
 void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 {
   // Get the depender.
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
   if (depender->GetType() == cmTarget::INTERFACE_LIBRARY)
     {
     return;
@@ -214,7 +215,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
   std::set<cmStdString> emitted;
   {
   std::vector<std::string> tlibs;
-  depender->GetDirectLinkLibraries(0, tlibs, depender);
+  depender->GetDirectLinkLibraries(0, tlibs, depender->Target);
   // A target should not depend on itself.
   emitted.insert(depender->GetName());
   for(std::vector<std::string>::const_iterator lib = tlibs.begin();
@@ -235,7 +236,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
     it != configs.end(); ++it)
     {
     std::vector<std::string> tlibs;
-    depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender);
+    depender->GetDirectLinkLibraries(it->c_str(), tlibs, depender->Target);
 
     // A target should not depend on itself.
     emitted.insert(depender->GetName());
@@ -255,7 +256,7 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 
   // Loop over all utility dependencies.
   {
-  std::set<cmStdString> const& tutils = depender->GetUtilities();
+  std::set<cmStdString> const& tutils = depender->Target->GetUtilities();
   std::set<cmStdString> emitted;
   // A target should not depend on itself.
   emitted.insert(depender->GetName());
@@ -273,17 +274,15 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
 
 //----------------------------------------------------------------------------
 void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
-                                                 cmTarget const* dependee,
-                                                 const char *config,
-                                               std::set<cmStdString> &emitted)
+                                            cmGeneratorTarget const* dependee,
+                                            const char *config,
+                                            std::set<cmStdString> &emitted)
 {
-  cmTarget const* depender = this->Targets[depender_index];
-  cmGeneratorTarget *gtgt = depender->GetMakefile()->GetLocalGenerator()
-                                    ->GetGlobalGenerator()
-                                    ->GetGeneratorTarget(dependee);
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
 
   if(cmGeneratorTarget::LinkInterface const* iface =
-                                gtgt->GetLinkInterface(config, depender))
+                                dependee->GetLinkInterface(config,
+                                                           depender->Target))
     {
     for(std::vector<std::string>::const_iterator
         lib = iface->Libraries.begin();
@@ -306,15 +305,15 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
                                              bool linking,
                                              std::set<cmStdString> &emitted)
 {
-  cmTarget const* depender = this->Targets[depender_index];
-  cmTarget const* dependee =
-    depender->GetMakefile()->FindTargetToUse(dependee_name);
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* dependee =
+    depender->GetMakefile()->FindGeneratorTargetToUse(dependee_name);
   // Skip targets that will not really be linked.  This is probably a
   // name conflict between an external library and an executable
   // within the project.
   if(linking && dependee &&
      dependee->GetType() == cmTarget::EXECUTABLE &&
-     !dependee->IsExecutableWithExports())
+     !dependee->Target->IsExecutableWithExports())
     {
     dependee = 0;
     }
@@ -323,7 +322,7 @@ void cmComputeTargetDepends::AddInterfaceDepends(int depender_index,
     {
     this->AddInterfaceDepends(depender_index, dependee, 0, emitted);
     std::vector<std::string> configs;
-    depender->GetMakefile()->GetConfigurations(configs);
+    depender->Target->GetMakefile()->GetConfigurations(configs);
     for (std::vector<std::string>::const_iterator it = configs.begin();
       it != configs.end(); ++it)
       {
@@ -341,18 +340,18 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
                                              bool linking)
 {
   // Get the depender.
-  cmTarget const* depender = this->Targets[depender_index];
+  cmGeneratorTarget const* depender = this->Targets[depender_index];
 
   // Check the target's makefile first.
-  cmTarget const* dependee =
-    depender->GetMakefile()->FindTargetToUse(dependee_name);
+  cmGeneratorTarget const* dependee =
+    depender->GetMakefile()->FindGeneratorTargetToUse(dependee_name);
 
   // Skip targets that will not really be linked.  This is probably a
   // name conflict between an external library and an executable
   // within the project.
   if(linking && dependee &&
      dependee->GetType() == cmTarget::EXECUTABLE &&
-     !dependee->IsExecutableWithExports())
+     !dependee->Target->IsExecutableWithExports())
     {
     dependee = 0;
     }
@@ -365,18 +364,18 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
 
 //----------------------------------------------------------------------------
 void cmComputeTargetDepends::AddTargetDepend(int depender_index,
-                                             cmTarget const* dependee,
+                                             cmGeneratorTarget const* dependee,
                                              bool linking)
 {
-  if(dependee->IsImported())
+  if(dependee->Target->IsImported())
     {
     // Skip imported targets but follow their utility dependencies.
-    std::set<cmStdString> const& utils = dependee->GetUtilities();
+    std::set<cmStdString> const& utils = dependee->Target->GetUtilities();
     for(std::set<cmStdString>::const_iterator i = utils.begin();
         i != utils.end(); ++i)
       {
-      if(cmTarget const* transitive_dependee =
-         dependee->GetMakefile()->FindTargetToUse(i->c_str()))
+      if(cmGeneratorTarget const* transitive_dependee =
+         dependee->GetMakefile()->FindGeneratorTargetToUse(i->c_str()))
         {
         this->AddTargetDepend(depender_index, transitive_dependee, false);
         }
@@ -386,7 +385,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
     {
     // Lookup the index for this target.  All targets should be known by
     // this point.
-    std::map<cmTarget const*, int>::const_iterator tii =
+    std::map<cmGeneratorTarget const*, int>::const_iterator tii =
       this->TargetIndex.find(dependee);
     assert(tii != this->TargetIndex.end());
     int dependee_index = tii->second;
@@ -406,13 +405,13 @@ cmComputeTargetDepends::DisplayGraph(Graph const& graph, const char* name)
   for(int depender_index = 0; depender_index < n; ++depender_index)
     {
     EdgeList const& nl = graph[depender_index];
-    cmTarget const* depender = this->Targets[depender_index];
+    cmGeneratorTarget const* depender = this->Targets[depender_index];
     fprintf(stderr, "target %d is [%s]\n",
             depender_index, depender->GetName());
     for(EdgeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni)
       {
       int dependee_index = *ni;
-      cmTarget const* dependee = this->Targets[dependee_index];
+      cmGeneratorTarget const* dependee = this->Targets[dependee_index];
       fprintf(stderr, "  depends on target %d [%s] (%s)\n", dependee_index,
               dependee->GetName(), ni->IsStrong()? "strong" : "weak");
       }
@@ -499,11 +498,12 @@ cmComputeTargetDepends
     {
     // Get the depender.
     int i = *ci;
-    cmTarget const* depender = this->Targets[i];
+    cmGeneratorTarget const* depender = this->Targets[i];
 
     // Describe the depender.
     e << "  \"" << depender->GetName() << "\" of type "
-      << cmTarget::GetTargetTypeName(depender->GetType()) << "\n";
+      << cmTarget::GetTargetTypeName(cmTarget::TargetType(depender->GetType()))
+      << "\n";
 
     // List its dependencies that are inside the component.
     EdgeList const& nl = this->InitialGraph[i];
@@ -512,7 +512,7 @@ cmComputeTargetDepends
       int j = *ni;
       if(cmap[j] == c)
         {
-        cmTarget const* dependee = this->Targets[j];
+        cmGeneratorTarget const* dependee = this->Targets[j];
         e << "    depends on \"" << dependee->GetName() << "\""
           << " (" << (ni->IsStrong()? "strong" : "weak") << ")\n";
         }
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h
index 6cd6da0..54d237a 100644
--- a/Source/cmComputeTargetDepends.h
+++ b/Source/cmComputeTargetDepends.h
@@ -20,7 +20,7 @@
 
 class cmComputeComponentGraph;
 class cmGlobalGenerator;
-class cmTarget;
+class cmGeneratorTarget;
 class cmTargetDependSet;
 
 /** \class cmComputeTargetDepends
@@ -38,21 +38,23 @@ public:
 
   bool Compute();
 
-  std::vector<cmTarget const*> const&
+  std::vector<cmGeneratorTarget const*> const&
   GetTargets() const { return this->Targets; }
-  void GetTargetDirectDepends(cmTarget const* t, cmTargetDependSet& deps);
+  void GetTargetDirectDepends(cmGeneratorTarget const* t,
+                              cmTargetDependSet& deps);
 private:
   void CollectTargets();
   void CollectDepends();
   void CollectTargetDepends(int depender_index);
   void AddTargetDepend(int depender_index, const char* dependee_name,
                        bool linking);
-  void AddTargetDepend(int depender_index, cmTarget const* dependee,
+  void AddTargetDepend(int depender_index, cmGeneratorTarget const* dependee,
                        bool linking);
   bool ComputeFinalDepends(cmComputeComponentGraph const& ccg);
   void AddInterfaceDepends(int depender_index, const char* dependee_name,
                            bool linking, std::set<cmStdString> &emitted);
-  void AddInterfaceDepends(int depender_index, cmTarget const* dependee,
+  void AddInterfaceDepends(int depender_index,
+                           cmGeneratorTarget const* dependee,
                            const char *config,
                            std::set<cmStdString> &emitted);
   cmGlobalGenerator* GlobalGenerator;
@@ -60,8 +62,8 @@ private:
   bool NoCycles;
 
   // Collect all targets.
-  std::vector<cmTarget const*> Targets;
-  std::map<cmTarget const*, int> TargetIndex;
+  std::vector<cmGeneratorTarget const*> Targets;
+  std::map<cmGeneratorTarget const*, int> TargetIndex;
 
   // Represent the target dependency graph.  The entry at each
   // top-level index corresponds to a depender whose dependencies are
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f135276..5ff1510 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -948,19 +948,20 @@ void cmGlobalGenerator::ClearEnabledLanguages()
 }
 
 bool cmGlobalGenerator::IsDependedOn(const char* project,
-                                     cmTarget const* targetIn)
+                                     cmGeneratorTarget const* targetIn)
 {
   // Get all local gens for this project
   std::vector<cmLocalGenerator*>* gens = &this->ProjectMap[project];
   // loop over local gens and get the targets for each one
   for(unsigned int i = 0; i < gens->size(); ++i)
     {
-    cmTargets& targets = (*gens)[i]->GetMakefile()->GetTargets();
-    for (cmTargets::iterator l = targets.begin();
+    const cmGeneratorTargetsType& targets = (*gens)[i]->GetMakefile()
+                                                      ->GetGeneratorTargets();
+    for (cmGeneratorTargetsType::const_iterator l = targets.begin();
          l != targets.end(); l++)
       {
-      cmTarget& target = l->second;
-      TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
+      cmGeneratorTarget *target = l->second;
+      TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(*target);
       if(tgtdeps.count(targetIn))
         {
         return true;
@@ -1234,9 +1235,9 @@ bool cmGlobalGenerator::ComputeTargetDepends()
     {
     return false;
     }
-  std::vector<cmTarget const*> const& targets = ctd.GetTargets();
-  for(std::vector<cmTarget const*>::const_iterator ti = targets.begin();
-      ti != targets.end(); ++ti)
+  std::vector<cmGeneratorTarget const*> const& targets = ctd.GetTargets();
+  for(std::vector<cmGeneratorTarget const*>::const_iterator ti
+      = targets.begin(); ti != targets.end(); ++ti)
     {
     ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]);
     }
@@ -1974,25 +1975,27 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap()
     {
     cmLocalGenerator* lg = *lgi;
     cmMakefile* mf = lg->GetMakefile();
-    cmTargets& targets = mf->GetTargets();
-    for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
+    const cmGeneratorTargetsType& targets = mf->GetGeneratorTargets();
+    for(cmGeneratorTargetsType::const_iterator t = targets.begin();
+        t != targets.end(); ++t)
       {
-      cmTarget& target = t->second;
+      cmGeneratorTarget* target = t->second;
 
       // Consider the directory containing the target and all its
       // parents until something excludes the target.
-      for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, target);
+      for(cmLocalGenerator* clg = lg;
+          clg && !this->IsExcluded(clg, *target->Target);
           clg = clg->GetParent())
         {
         // This local generator includes the target.
         std::set<cmTarget const*>& targetSet =
           this->LocalGeneratorToTargetMap[clg];
-        targetSet.insert(&target);
+        targetSet.insert(target->Target);
 
         // Add dependencies of the included target.  An excluded
         // target may still be included if it is a dependency of a
         // non-excluded target.
-        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(target);
+        TargetDependSet const& tgtdeps = this->GetTargetDirectDepends(*target);
         for(TargetDependSet::const_iterator ti = tgtdeps.begin();
             ti != tgtdeps.end(); ++ti)
           {
@@ -2529,7 +2532,7 @@ void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*,
 
 //----------------------------------------------------------------------------
 cmGlobalGenerator::TargetDependSet const&
-cmGlobalGenerator::GetTargetDirectDepends(cmTarget const& target)
+cmGlobalGenerator::GetTargetDirectDepends(cmGeneratorTarget const& target)
 {
   return this->TargetDependencies[&target];
 }
@@ -2625,18 +2628,19 @@ void cmGlobalGenerator::GetTargetSets(TargetDependSet& projectTargets,
       }
     cmMakefile* mf = (*i)->GetMakefile();
     // Get the targets in the makefile
-    cmTargets &tgts = mf->GetTargets();
+    const cmGeneratorTargetsType &tgts = mf->GetGeneratorTargets();
     // loop over all the targets
-    for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
+    for (cmGeneratorTargetsType::const_iterator l = tgts.begin();
+         l != tgts.end(); ++l)
       {
-      cmTarget* target = &l->second;
-      if(this->IsRootOnlyTarget(target) &&
-         target->GetMakefile() != root->GetMakefile())
+      cmGeneratorTarget* target = l->second;
+      if(this->IsRootOnlyTarget(target->Target) &&
+         target->Target->GetMakefile() != root->GetMakefile())
         {
         continue;
         }
       // put the target in the set of original targets
-      originalTargets.insert(target);
+      originalTargets.insert(target->Target);
       // Get the set of targets that depend on target
       this->AddTargetDepends(target, projectTargets);
       }
@@ -2651,7 +2655,7 @@ bool cmGlobalGenerator::IsRootOnlyTarget(cmTarget* target)
 }
 
 //----------------------------------------------------------------------------
-void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
+void cmGlobalGenerator::AddTargetDepends(cmGeneratorTarget const* target,
                                          TargetDependSet& projectTargets)
 {
   // add the target itself
@@ -2663,7 +2667,11 @@ void cmGlobalGenerator::AddTargetDepends(cmTarget const* target,
     for(TargetDependSet::const_iterator i = ts.begin(); i != ts.end(); ++i)
       {
       cmTarget const* dtarget = *i;
-      this->AddTargetDepends(dtarget, projectTargets);
+      cmGeneratorTarget *gtgt = dtarget->GetMakefile()->GetLocalGenerator()
+                                ->GetGlobalGenerator()
+                                ->GetGeneratorTarget(dtarget);
+
+      this->AddTargetDepends(gtgt, projectTargets);
       }
     }
 }
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 3c86537..b3f6827 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -220,7 +220,7 @@ public:
 
   /** If check to see if the target is linked to by any other
       target in the project */
-  bool IsDependedOn(const char* project, cmTarget const* target);
+  bool IsDependedOn(const char* project, cmGeneratorTarget const* target);
   ///! Find a local generator by its startdirectory
   cmLocalGenerator* FindLocalGenerator(const char* start_dir);
 
@@ -268,7 +268,8 @@ public:
 
   // what targets does the specified target depend on directly
   // via a target_link_libraries or add_dependencies
-  TargetDependSet const& GetTargetDirectDepends(cmTarget const& target);
+  TargetDependSet const&
+  GetTargetDirectDepends(cmGeneratorTarget const& target);
 
   /** Get per-target generator information.  */
   cmGeneratorTarget* GetGeneratorTarget(cmTarget const*) const;
@@ -327,7 +328,7 @@ protected:
                              TargetDependSet& originalTargets,
                              cmLocalGenerator* root, GeneratorVector const&);
   virtual bool IsRootOnlyTarget(cmTarget* target);
-  void AddTargetDepends(cmTarget const* target,
+  void AddTargetDepends(cmGeneratorTarget const* target,
                         TargetDependSet& projectTargets);
   void SetLanguageEnabledFlag(const char* l, cmMakefile* mf);
   void SetLanguageEnabledMaps(const char* l, cmMakefile* mf);
@@ -430,7 +431,7 @@ private:
   std::vector<std::string> FilesReplacedDuringGenerate;
 
   // Store computed inter-target dependencies.
-  typedef std::map<cmTarget const*, TargetDependSet> TargetDependMap;
+  typedef std::map<cmGeneratorTarget const*, TargetDependSet> TargetDependMap;
   TargetDependMap TargetDependencies;
 
   // Per-target generator information.
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index a53cd9b..631962f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -893,8 +893,12 @@ cmGlobalNinjaGenerator
     std::set<cmStdString> const& utils = target->GetUtilities();
     std::copy(utils.begin(), utils.end(), std::back_inserter(outputs));
   } else {
+    cmGeneratorTarget *gtgt = target->GetMakefile()->GetLocalGenerator()
+                                    ->GetGlobalGenerator()
+                                    ->GetGeneratorTarget(target);
+
     cmTargetDependSet const& targetDeps =
-      this->GetTargetDirectDepends(*target);
+      this->GetTargetDirectDepends(*gtgt);
     for (cmTargetDependSet::const_iterator i = targetDeps.begin();
          i != targetDeps.end(); ++i)
       {
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index c339058..e328589 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -926,7 +926,12 @@ cmGlobalUnixMakefileGenerator3
   if(emitted.insert(target).second)
     {
     count = this->ProgressMap[target].Marks.size();
-    TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+
+    cmGeneratorTarget *gtgt = target->GetMakefile()->GetLocalGenerator()
+                                    ->GetGlobalGenerator()
+                                    ->GetGeneratorTarget(target);
+
+    TargetDependSet const& depends = this->GetTargetDirectDepends(*gtgt);
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
       {
@@ -1015,7 +1020,11 @@ cmGlobalUnixMakefileGenerator3
 ::AppendGlobalTargetDepends(std::vector<std::string>& depends,
                             cmTarget& target)
 {
-  TargetDependSet const& depends_set = this->GetTargetDirectDepends(target);
+  cmGeneratorTarget *gtgt = target.GetMakefile()->GetLocalGenerator()
+                                  ->GetGlobalGenerator()
+                                  ->GetGeneratorTarget(&target);
+
+  TargetDependSet const& depends_set = this->GetTargetDirectDepends(*gtgt);
   for(TargetDependSet::const_iterator i = depends_set.begin();
       i != depends_set.end(); ++i)
     {
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index bb63289..52f1293 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -985,7 +985,10 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project,
     {
     return activeConfigs;
     }
-  if(type == cmTarget::UTILITY && !this->IsDependedOn(project, target))
+  cmGeneratorTarget const* gtgt = target->GetMakefile()->GetLocalGenerator()
+                                        ->GetGlobalGenerator()
+                                        ->GetGeneratorTarget(target);
+  if(type == cmTarget::UTILITY && !this->IsDependedOn(project, gtgt))
     {
     return activeConfigs;
     }
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 12c240b..f106784 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -417,7 +417,10 @@ bool cmGlobalVisualStudio8Generator::ComputeTargetDepends()
 void cmGlobalVisualStudio8Generator::WriteProjectDepends(
   std::ostream& fout, const char*, const char*, cmTarget const& t)
 {
-  TargetDependSet const& unordered = this->GetTargetDirectDepends(t);
+  cmGeneratorTarget const* gtgt = t.GetMakefile()->GetLocalGenerator()
+                                    ->GetGlobalGenerator()
+                                    ->GetGeneratorTarget(&t);
+  TargetDependSet const& unordered = this->GetTargetDirectDepends(*gtgt);
   OrderedTargetDependSet depends(unordered);
   for(OrderedTargetDependSet::const_iterator i = depends.begin();
       i != depends.end(); ++i)
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 42492e6..7fa7cee 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -322,7 +322,10 @@ void cmGlobalVisualStudioGenerator::FillLinkClosure(cmTarget const* target,
 {
   if(linked.insert(target).second)
     {
-    TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+    cmGeneratorTarget const* gtgt = target->GetMakefile()->GetLocalGenerator()
+                                          ->GetGlobalGenerator()
+                                          ->GetGeneratorTarget(target);
+    TargetDependSet const& depends = this->GetTargetDirectDepends(*gtgt);
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
       {
@@ -361,7 +364,10 @@ void cmGlobalVisualStudioGenerator::FollowLinkDepends(
     {
     // Static library targets do not list their link dependencies so
     // we must follow them transitively now.
-    TargetDependSet const& depends = this->GetTargetDirectDepends(*target);
+    cmGeneratorTarget const* gtgt = target->GetMakefile()->GetLocalGenerator()
+                                          ->GetGlobalGenerator()
+                                          ->GetGeneratorTarget(target);
+    TargetDependSet const& depends = this->GetTargetDirectDepends(*gtgt);
     for(TargetDependSet::const_iterator di = depends.begin();
         di != depends.end(); ++di)
       {
@@ -436,7 +442,10 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
                         target.GetType() != cmTarget::MODULE_LIBRARY &&
                         target.GetType() != cmTarget::EXECUTABLE);
 
-  TargetDependSet const& depends = this->GetTargetDirectDepends(target);
+  cmGeneratorTarget const* gtgt = target.GetMakefile()->GetLocalGenerator()
+                                        ->GetGlobalGenerator()
+                                        ->GetGeneratorTarget(&target);
+  TargetDependSet const& depends = this->GetTargetDirectDepends(*gtgt);
 
   // Collect implicit link dependencies (target_link_libraries).
   // Static libraries cannot depend on their link implementation
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 26e5c2a..2687827 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2788,7 +2788,11 @@ void cmGlobalXCodeGenerator
     }
 
   // Add dependencies on other CMake targets.
-  TargetDependSet const& deps = this->GetTargetDirectDepends(*cmtarget);
+
+  cmGeneratorTarget const* gtgt = cmtarget->GetMakefile()->GetLocalGenerator()
+                                    ->GetGlobalGenerator()
+                                    ->GetGeneratorTarget(cmtarget);
+  TargetDependSet const& deps = this->GetTargetDirectDepends(*gtgt);
   for(TargetDependSet::const_iterator i = deps.begin(); i != deps.end(); ++i)
     {
     if(cmXCodeObject* dptarget = this->FindXCodeTarget(*i))
diff --git a/Source/cmTargetDepend.h b/Source/cmTargetDepend.h
index 1feb072..ccfd95a 100644
--- a/Source/cmTargetDepend.h
+++ b/Source/cmTargetDepend.h
@@ -14,7 +14,7 @@
 
 #include "cmStandardIncludes.h"
 
-class cmTarget;
+#include "cmGeneratorTarget.h"
 
 /** One edge in the global target dependency graph.
     It may be marked as a 'link' or 'util' edge or both.  */
@@ -27,6 +27,8 @@ class cmTargetDepend
   mutable bool Link;
   mutable bool Util;
 public:
+  cmTargetDepend(cmGeneratorTarget const* t)
+    : Target(t->Target), Link(false), Util(false) {}
   cmTargetDepend(cmTarget const* t): Target(t), Link(false), Util(false) {}
   operator cmTarget const*() const { return this->Target; }
   cmTarget const* operator->() const { return this->Target; }
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 62fea2d..d04ea97 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1848,7 +1848,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
 void cmVisualStudio10TargetGenerator::WriteProjectReferences()
 {
   cmGlobalGenerator::TargetDependSet const& unordered
-    = this->GlobalGenerator->GetTargetDirectDepends(*this->Target);
+    = this->GlobalGenerator->GetTargetDirectDepends(*this->GeneratorTarget);
   typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet
     OrderedTargetDependSet;
   OrderedTargetDependSet depends(unordered);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=871156b5be6fef78df80698b083968e75295d0f6
commit 871156b5be6fef78df80698b083968e75295d0f6
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Dec 10 09:44:54 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:05 2014 +0100

    Move HaveBuildTreeRPATH to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index cbe0f65..74102c6 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1910,10 +1910,10 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
     (for_install ||
      this->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"));
   bool use_install_rpath =
-    (outputRuntime && this->Target->Target->HaveInstallTreeRPATH() &&
+    (outputRuntime && this->Target->HaveInstallTreeRPATH() &&
      linking_for_install);
   bool use_build_rpath =
-    (outputRuntime && this->Target->Target->HaveBuildTreeRPATH(this->Config)
+    (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config)
       && !linking_for_install);
   bool use_link_rpath =
     outputRuntime && linking_for_install &&
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1bc4cd0..a17d4c7 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -492,8 +492,8 @@ bool cmGeneratorTarget::NeedRelinkBeforeInstall(const char* config) const
   // If either a build or install tree rpath is set then the rpath
   // will likely change between the build tree and install tree and
   // this target must be relinked.
-  return this->Target->HaveBuildTreeRPATH(config)
-      || this->Target->HaveInstallTreeRPATH();
+  return this->HaveBuildTreeRPATH(config)
+      || this->HaveInstallTreeRPATH();
 }
 
 //----------------------------------------------------------------------------
@@ -3777,3 +3777,23 @@ void cmGeneratorTarget::ComputeVersionedName(std::string& vName,
     }
   vName += apple ? suffix : std::string();
 }
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HaveBuildTreeRPATH(const char *config) const
+{
+  if (this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
+    {
+    return false;
+    }
+  std::vector<std::string> libs;
+  this->GetDirectLinkLibraries(config, libs, this->Target);
+  return !libs.empty();
+}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HaveInstallTreeRPATH() const
+{
+  const char* install_rpath = this->GetProperty("INSTALL_RPATH");
+  return (install_rpath && *install_rpath) &&
+          !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 6633ff8..389cb93 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -327,6 +327,9 @@ public:
   LinkImplementation const* GetLinkImplementation(const char* config,
                                                   cmTarget const* head) const;
 
+  bool HaveBuildTreeRPATH(const char *config) const;
+  bool HaveInstallTreeRPATH() const;
+
 private:
   friend class cmTargetTraceDependencies;
   struct SourceEntry { std::vector<cmSourceFile*> Depends; };
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 4cfdb6d..a2709a7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2492,26 +2492,6 @@ void cmTarget::SetPropertyDefault(const char* property,
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::HaveBuildTreeRPATH(const char *config) const
-{
-  if (this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
-    {
-    return false;
-    }
-  std::vector<std::string> libs;
-  this->GetDirectLinkLibraries(config, libs, this);
-  return !libs.empty();
-}
-
-//----------------------------------------------------------------------------
-bool cmTarget::HaveInstallTreeRPATH() const
-{
-  const char* install_rpath = this->GetProperty("INSTALL_RPATH");
-  return (install_rpath && *install_rpath) &&
-          !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH");
-}
-
-//----------------------------------------------------------------------------
 const char* cmTarget::GetOutputTargetType(bool implib) const
 {
   switch(this->GetType())
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index a7f0f48..a352d64 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -296,9 +296,6 @@ public:
   bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
                         const char* newExt = 0) const;
 
-  bool HaveBuildTreeRPATH(const char *config) const;
-  bool HaveInstallTreeRPATH() const;
-
   // Get the properties
   cmPropertyMap &GetProperties() const { return this->Properties; };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20931df26fa7a916653428f4863149809e9b68e2
commit 20931df26fa7a916653428f4863149809e9b68e2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Dec 9 22:06:57 2013 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:05 2014 +0100

    Move ComputeVersionedName to cmGeneratorTarget.

diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 67b7b69..1bc4cd0 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3066,11 +3066,11 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
   else
   {
     // The library's soname.
-    this->Target->ComputeVersionedName(soName, prefix, base, suffix,
+    this->ComputeVersionedName(soName, prefix, base, suffix,
                               name, soversion);
 
     // The library's real name on disk.
-    this->Target->ComputeVersionedName(realName, prefix, base, suffix,
+    this->ComputeVersionedName(realName, prefix, base, suffix,
                               name, version);
   }
 
@@ -3759,3 +3759,21 @@ bool cmGeneratorTarget::MacOSXRpathInstallNameDirDefault() const
 
   return false;
 }
+
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::ComputeVersionedName(std::string& vName,
+                                             std::string const& prefix,
+                                             std::string const& base,
+                                             std::string const& suffix,
+                                             std::string const& name,
+                                             const char* version) const
+{
+  const bool apple = this->Makefile->IsOn("APPLE");
+  vName = apple ? (prefix+base) : name;
+  if(version)
+    {
+    vName += ".";
+    vName += version;
+    }
+  vName += apple ? suffix : std::string();
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index b1b42dd..6633ff8 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -361,6 +361,12 @@ private:
                                  LinkImplementation& impl,
                                  cmTarget const* head) const;
 
+  void ComputeVersionedName(std::string& vName,
+                            std::string const& prefix,
+                            std::string const& base,
+                            std::string const& suffix,
+                            std::string const& name,
+                            const char* version) const;
 
   typedef std::map<TargetConfigPair, LinkClosure> LinkClosureMapType;
   mutable LinkClosureMapType LinkClosureMap;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3ce81a4..4cfdb6d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2454,23 +2454,6 @@ cmTarget::ImportedGetFullPath(const char* config, bool implib) const
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::ComputeVersionedName(std::string& vName,
-                                    std::string const& prefix,
-                                    std::string const& base,
-                                    std::string const& suffix,
-                                    std::string const& name,
-                                    const char* version) const
-{
-  vName = this->IsApple? (prefix+base) : name;
-  if(version)
-    {
-    vName += ".";
-    vName += version;
-    }
-  vName += this->IsApple? suffix : std::string();
-}
-
-//----------------------------------------------------------------------------
 bool cmTarget::HasImplibGNUtoMS() const
 {
   return this->HasImportLibrary() && this->GetPropertyAsBool("GNUtoMS");
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 48bead1..a7f0f48 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -551,12 +551,6 @@ private:
   cmTargetInternalPointer Internal;
 
   void ConstructSourceFileFlags() const;
-  void ComputeVersionedName(std::string& vName,
-                            std::string const& prefix,
-                            std::string const& base,
-                            std::string const& suffix,
-                            std::string const& name,
-                            const char* version) const;
 };
 
 typedef std::map<cmStdString,cmTarget> cmTargets;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6302c91ffa12ebd62a77a211b2648b54354d90b4
commit 6302c91ffa12ebd62a77a211b2648b54354d90b4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Oct 10 22:20:56 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:05 2014 +0100

    Port part of cmLinkInformation to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 939a9e7..cbe0f65 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -240,12 +240,12 @@ because this need be done only for shared libraries without soname-s.
 
 //----------------------------------------------------------------------------
 cmComputeLinkInformation
-::cmComputeLinkInformation(cmTarget const* target, const char* config,
+::cmComputeLinkInformation(cmGeneratorTarget const* target, const char* config,
                            cmTarget const* headTarget)
 {
   // Store context information.
   this->Target = target;
-  this->Makefile = this->Target->GetMakefile();
+  this->Makefile = this->Target->Target->GetMakefile();
   this->HeadTarget = this->Makefile->GetLocalGenerator()
                                    ->GetGlobalGenerator()
                                    ->GetGeneratorTarget(headTarget);
@@ -262,18 +262,15 @@ cmComputeLinkInformation
 
   // Allocate internals.
   this->OrderLinkerSearchPath =
-    new cmOrderDirectories(this->GlobalGenerator, target,
+    new cmOrderDirectories(this->GlobalGenerator, target->Target,
                            "linker search path");
   this->OrderRuntimeSearchPath =
-    new cmOrderDirectories(this->GlobalGenerator, target,
+    new cmOrderDirectories(this->GlobalGenerator, target->Target,
                            "runtime search path");
   this->OrderDependentRPath = 0;
 
-  cmGeneratorTarget *gtgt = this->Target->GetMakefile()->GetLocalGenerator()
-                                ->GetGlobalGenerator()
-                                ->GetGeneratorTarget(this->Target);
   // Get the language used for linking this target.
-  this->LinkLanguage = gtgt->GetLinkerLanguage(config, headTarget);
+  this->LinkLanguage = this->Target->GetLinkerLanguage(config, headTarget);
   if(!this->LinkLanguage)
     {
     // The Compute method will do nothing, so skip the rest of the
@@ -329,7 +326,7 @@ cmComputeLinkInformation
       (this->Makefile->
        GetSafeDefinition("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH"));
 
-    this->RuntimeUseChrpath = gtgt->IsChrpathUsed(config);
+    this->RuntimeUseChrpath = this->Target->IsChrpathUsed(config);
 
     // Get options needed to help find dependent libraries.
     std::string rlVar = "CMAKE_";
@@ -375,15 +372,15 @@ cmComputeLinkInformation
     {
     this->SharedDependencyMode = SharedDepModeDir;
     this->OrderDependentRPath =
-      new cmOrderDirectories(this->GlobalGenerator, target,
+      new cmOrderDirectories(this->GlobalGenerator, target->Target,
                              "dependent library path");
     }
 
   // Add the search path entries requested by the user to path ordering.
   this->OrderLinkerSearchPath
-    ->AddUserDirectories(this->Target->GetLinkDirectories());
+    ->AddUserDirectories(this->Target->Target->GetLinkDirectories());
   this->OrderRuntimeSearchPath
-    ->AddUserDirectories(this->Target->GetLinkDirectories());
+    ->AddUserDirectories(this->Target->Target->GetLinkDirectories());
 
   // Set up the implicit link directories.
   this->LoadImplicitLinkInfo();
@@ -411,12 +408,13 @@ cmComputeLinkInformation
   // order to support such projects we need to add the directories
   // containing libraries linked with a full path to the -L path.
   this->OldLinkDirMode =
-    this->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW;
+    this->Target->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW;
   if(this->OldLinkDirMode)
     {
     // Construct a mask to not bother with this behavior for link
     // directories already specified by the user.
-    std::vector<std::string> const& dirs = this->Target->GetLinkDirectories();
+    std::vector<std::string> const& dirs =
+                                  this->Target->Target->GetLinkDirectories();
     for(std::vector<std::string>::const_iterator di = dirs.begin();
         di != dirs.end(); ++di)
       {
@@ -512,7 +510,7 @@ bool cmComputeLinkInformation::Compute()
     }
 
   // Compute the ordered link line items.
-  cmComputeLinkDepends cld(this->Target, this->Config,
+  cmComputeLinkDepends cld(this->Target->Target, this->Config,
                            this->HeadTarget->Target);
   cld.SetOldLinkDirMode(this->OldLinkDirMode);
   cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute();
@@ -583,11 +581,8 @@ void cmComputeLinkInformation::AddImplicitLinkInfo()
 {
   // The link closure lists all languages whose implicit info is needed.
 
-  cmGeneratorTarget *gtgt = this->Target->GetMakefile()->GetLocalGenerator()
-                                ->GetGlobalGenerator()
-                                ->GetGeneratorTarget(this->Target);
-
-  cmGeneratorTarget::LinkClosure const* lc = gtgt->GetLinkClosure(this->Config,
+  cmGeneratorTarget::LinkClosure const* lc =
+                                    this->Target->GetLinkClosure(this->Config,
                                                     this->HeadTarget->Target);
   for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
       li != lc->Languages.end(); ++li)
@@ -1152,7 +1147,7 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item)
 
   // Full path libraries should specify a valid library file name.
   // See documentation of CMP0008.
-  if(this->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW &&
+  if(this->Target->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW &&
      (strstr(this->GlobalGenerator->GetName(), "Visual Studio") ||
       strstr(this->GlobalGenerator->GetName(), "Xcode")))
     {
@@ -1523,7 +1518,7 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
   this->OrderLinkerSearchPath->AddLinkLibrary(item);
 
   // Produce any needed message.
-  switch(this->Target->GetPolicyStatusCMP0008())
+  switch(this->Target->Target->GetPolicyStatusCMP0008())
     {
     case cmPolicies::WARN:
       {
@@ -1540,7 +1535,7 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
           << "  " << item << "\n"
           << "which is a full-path but not a valid library file name.";
         this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
-                                          this->Target->GetBacktrace());
+                                        this->Target->Target->GetBacktrace());
         }
       }
     case cmPolicies::OLD:
@@ -1559,7 +1554,7 @@ void cmComputeLinkInformation::HandleBadFullItem(std::string const& item,
           << "  " << item << "\n"
           << "which is a full-path but not a valid library file name.";
       this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(),
-                                        this->Target->GetBacktrace());
+                                        this->Target->Target->GetBacktrace());
       }
       break;
     }
@@ -1576,7 +1571,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
     }
 
   // Enforce policy constraints.
-  switch(this->Target->GetPolicyStatusCMP0003())
+  switch(this->Target->Target->GetPolicyStatusCMP0003())
     {
     case cmPolicies::WARN:
       if(!this->CMakeInstance->GetPropertyAsBool("CMP0003-WARNING-GIVEN"))
@@ -1585,7 +1580,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
         cmOStringStream w;
         this->PrintLinkPolicyDiagnosis(w);
         this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(),
-                                          this->Target->GetBacktrace());
+                                        this->Target->Target->GetBacktrace());
         }
     case cmPolicies::OLD:
       // OLD behavior is to add the paths containing libraries with
@@ -1602,7 +1597,7 @@ bool cmComputeLinkInformation::FinishLinkerSearchDirectories()
             GetRequiredPolicyError(cmPolicies::CMP0003)) << "\n";
       this->PrintLinkPolicyDiagnosis(e);
       this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(),
-                                        this->Target->GetBacktrace());
+                                        this->Target->Target->GetBacktrace());
       return false;
       }
     }
@@ -1778,7 +1773,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
   // @loader_path or full paths.
   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
-    cmGeneratorTarget *gtgt = this->Target->GetMakefile()->GetLocalGenerator()
+    cmGeneratorTarget *gtgt = target->GetMakefile()->GetLocalGenerator()
                                 ->GetGlobalGenerator()
                                 ->GetGeneratorTarget(target);
     if(!gtgt->HasMacOSXRpathInstallNameDir(this->Config))
@@ -1915,11 +1910,11 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
     (for_install ||
      this->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"));
   bool use_install_rpath =
-    (outputRuntime && this->Target->HaveInstallTreeRPATH() &&
+    (outputRuntime && this->Target->Target->HaveInstallTreeRPATH() &&
      linking_for_install);
   bool use_build_rpath =
-    (outputRuntime && this->Target->HaveBuildTreeRPATH(this->Config) &&
-     !linking_for_install);
+    (outputRuntime && this->Target->Target->HaveBuildTreeRPATH(this->Config)
+      && !linking_for_install);
   bool use_link_rpath =
     outputRuntime && linking_for_install &&
     !this->Makefile->IsOn("CMAKE_SKIP_INSTALL_RPATH") &&
@@ -2001,11 +1996,8 @@ void cmComputeLinkInformation::GetRPath(std::vector<std::string>& runtimeDirs,
   // Add runtime paths required by the languages to always be
   // present.  This is done even when skipping rpath support.
   {
-  cmGeneratorTarget *gtgt = this->Makefile->GetLocalGenerator()
-                                ->GetGlobalGenerator()
-                                ->GetGeneratorTarget(this->Target);
   cmGeneratorTarget::LinkClosure const* lc =
-    gtgt->GetLinkClosure(this->Config, this->HeadTarget->Target);
+    this->Target->GetLinkClosure(this->Config, this->HeadTarget->Target);
   for(std::vector<std::string>::const_iterator li = lc->Languages.begin();
       li != lc->Languages.end(); ++li)
     {
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index f91f6cc..c39cb31 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -30,7 +30,7 @@ class cmOrderDirectories;
 class cmComputeLinkInformation
 {
 public:
-  cmComputeLinkInformation(cmTarget const* target, const char* config,
+  cmComputeLinkInformation(cmGeneratorTarget const* target, const char* config,
                            cmTarget const* headTarget);
   ~cmComputeLinkInformation();
   bool Compute();
@@ -75,7 +75,7 @@ private:
   std::set<cmTarget const*> SharedLibrariesLinked;
 
   // Context information.
-  cmTarget const* Target;
+  cmGeneratorTarget const* Target;
   cmGeneratorTarget const* HeadTarget;
   cmMakefile* Makefile;
   cmLocalGenerator* LocalGenerator;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ce2ce75..67b7b69 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2178,7 +2178,7 @@ cmGeneratorTarget::GetLinkInformation(const char* config,
     {
     // Compute information for this configuration.
     cmComputeLinkInformation* info =
-      new cmComputeLinkInformation(this->Target, config, headTarget);
+      new cmComputeLinkInformation(this, config, headTarget);
     if(!info || !info->Compute())
       {
       delete info;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c2ce1b6fbc87132d8b926713dd090f727328ad7
commit 4c2ce1b6fbc87132d8b926713dd090f727328ad7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Oct 9 14:49:35 2012 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jan 11 14:30:05 2014 +0100

    Move HasMacOSXRPath to cmGeneratorTarget.

diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index dd9968f..939a9e7 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1778,7 +1778,10 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
   // @loader_path or full paths.
   if(this->Makefile->IsOn("CMAKE_PLATFORM_HAS_INSTALLNAME"))
     {
-    if(!target->HasMacOSXRpathInstallNameDir(this->Config))
+    cmGeneratorTarget *gtgt = this->Target->GetMakefile()->GetLocalGenerator()
+                                ->GetGlobalGenerator()
+                                ->GetGeneratorTarget(target);
+    if(!gtgt->HasMacOSXRpathInstallNameDir(this->Config))
       {
       return;
       }
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d903997..ce2ce75 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -683,7 +683,7 @@ cmGeneratorTarget::GetInstallNameDirForBuildTree(const char* config) const
      !this->GetPropertyAsBool("SKIP_BUILD_RPATH"))
     {
     std::string dir;
-    if(this->Target->MacOSXRpathInstallNameDirDefault())
+    if(this->MacOSXRpathInstallNameDirDefault())
       {
       dir = "@rpath";
       }
@@ -719,7 +719,7 @@ std::string cmGeneratorTarget::GetInstallNameDirForInstallTree() const
       }
     if(!install_name_dir)
       {
-      if(this->Target->MacOSXRpathInstallNameDirDefault())
+      if(this->MacOSXRpathInstallNameDirDefault())
         {
         dir = "@rpath/";
         }
@@ -3645,3 +3645,117 @@ bool cmStrictTargetComparison::operator()(cmTarget const* t1,
     }
   return nameResult < 0;
 }
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::HasMacOSXRpathInstallNameDir(const char* config) const
+{
+  bool install_name_is_rpath = false;
+  bool macosx_rpath = false;
+
+  if(!this->IsImported())
+    {
+    if(this->GetType() != cmTarget::SHARED_LIBRARY)
+      {
+      return false;
+      }
+    const char* install_name = this->GetProperty("INSTALL_NAME_DIR");
+    bool use_install_name =
+      this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH");
+    if(install_name && use_install_name &&
+       std::string(install_name) == "@rpath")
+      {
+      install_name_is_rpath = true;
+      }
+    else if(install_name && use_install_name)
+      {
+      return false;
+      }
+    if(!install_name_is_rpath)
+      {
+      macosx_rpath = this->MacOSXRpathInstallNameDirDefault();
+      }
+    }
+  else
+    {
+    // Lookup the imported soname.
+    if(cmTarget::ImportInfo const* info =
+                            this->Target->GetImportInfo(config, this->Target))
+      {
+      if(!info->NoSOName && !info->SOName.empty())
+        {
+        if(info->SOName.find("@rpath/") == 0)
+          {
+          install_name_is_rpath = true;
+          }
+        }
+      else
+        {
+        std::string install_name;
+        cmSystemTools::GuessLibraryInstallName(info->Location, install_name);
+        if(install_name.find("@rpath") != std::string::npos)
+          {
+          install_name_is_rpath = true;
+          }
+        }
+      }
+    }
+
+  if(!install_name_is_rpath && !macosx_rpath)
+    {
+    return false;
+    }
+
+  if(!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG"))
+    {
+    cmOStringStream w;
+    w << "Attempting to use";
+    if(macosx_rpath)
+      {
+      w << " MACOSX_RPATH";
+      }
+    else
+      {
+      w << " @rpath";
+      }
+    w << " without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set.";
+    w << "  This could be because you are using a Mac OS X version";
+    w << " less than 10.5 or because CMake's platform configuration is";
+    w << " corrupt.";
+    cmake* cm = this->Makefile->GetCMakeInstance();
+    cm->IssueMessage(cmake::FATAL_ERROR, w.str(),
+                     this->Target->GetBacktrace());
+    }
+
+  return true;
+}
+
+//----------------------------------------------------------------------------
+bool cmGeneratorTarget::MacOSXRpathInstallNameDirDefault() const
+{
+  // we can't do rpaths when unsupported
+  if(!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG"))
+    {
+    return false;
+    }
+
+  const char* macosx_rpath_str = this->GetProperty("MACOSX_RPATH");
+  if(macosx_rpath_str)
+    {
+    return this->GetPropertyAsBool("MACOSX_RPATH");
+    }
+
+  cmPolicies::PolicyStatus cmp0042 = this->Target->GetPolicyStatusCMP0042();
+
+  if(cmp0042 == cmPolicies::WARN)
+    {
+    this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
+      AddCMP0042WarnTarget(this->GetName());
+    }
+
+  if(cmp0042 == cmPolicies::NEW)
+    {
+    return true;
+    }
+
+  return false;
+}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index df82891..b1b42dd 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -175,6 +175,12 @@ public:
 
   cmMakefile* GetMakefile() const;
 
+  /** Whether this library has \@rpath and platform supports it.  */
+  bool HasMacOSXRpathInstallNameDir(const char* config) const;
+
+  /** Whether this library defaults to \@rpath.  */
+  bool MacOSXRpathInstallNameDirDefault() const;
+
   void GetAppleArchs(const char* config,
                      std::vector<std::string>& archVec) const;
 
diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx
index a9a27b9..9b8fdc6 100644
--- a/Source/cmLocalXCodeGenerator.cxx
+++ b/Source/cmLocalXCodeGenerator.cxx
@@ -49,11 +49,16 @@ void cmLocalXCodeGenerator::Generate()
 {
   cmLocalGenerator::Generate();
 
-  cmTargets& targets = this->Makefile->GetTargets();
-  for(cmTargets::iterator iter = targets.begin();
+  const cmGeneratorTargetsType &targets =
+                                        this->Makefile->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::const_iterator iter = targets.begin();
       iter != targets.end(); ++iter)
     {
-    cmTarget* t = &iter->second;
+    if (iter->first->IsImported())
+      {
+      continue;
+      }
+    cmGeneratorTarget* t = iter->second;
     t->HasMacOSXRpathInstallNameDir(NULL);
     }
 }
@@ -63,11 +68,16 @@ void cmLocalXCodeGenerator::GenerateInstallRules()
 {
   cmLocalGenerator::GenerateInstallRules();
 
-  cmTargets& targets = this->Makefile->GetTargets();
-  for(cmTargets::iterator iter = targets.begin();
+  const cmGeneratorTargetsType &targets =
+                                        this->Makefile->GetGeneratorTargets();
+  for(cmGeneratorTargetsType::const_iterator iter = targets.begin();
       iter != targets.end(); ++iter)
     {
-    cmTarget* t = &iter->second;
+    if (iter->first->IsImported())
+      {
+      continue;
+      }
+    cmGeneratorTarget* t = iter->second;
     t->HasMacOSXRpathInstallNameDir(NULL);
     }
 }
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c171739..3ce81a4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2416,118 +2416,6 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib) const
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::HasMacOSXRpathInstallNameDir(const char* config) const
-{
-  bool install_name_is_rpath = false;
-  bool macosx_rpath = false;
-
-  if(!this->IsImportedTarget)
-    {
-    if(this->GetType() != cmTarget::SHARED_LIBRARY)
-      {
-      return false;
-      }
-    const char* install_name = this->GetProperty("INSTALL_NAME_DIR");
-    bool use_install_name =
-      this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH");
-    if(install_name && use_install_name &&
-       std::string(install_name) == "@rpath")
-      {
-      install_name_is_rpath = true;
-      }
-    else if(install_name && use_install_name)
-      {
-      return false;
-      }
-    if(!install_name_is_rpath)
-      {
-      macosx_rpath = this->MacOSXRpathInstallNameDirDefault();
-      }
-    }
-  else
-    {
-    // Lookup the imported soname.
-    if(cmTarget::ImportInfo const* info = this->GetImportInfo(config, this))
-      {
-      if(!info->NoSOName && !info->SOName.empty())
-        {
-        if(info->SOName.find("@rpath/") == 0)
-          {
-          install_name_is_rpath = true;
-          }
-        }
-      else
-        {
-        std::string install_name;
-        cmSystemTools::GuessLibraryInstallName(info->Location, install_name);
-        if(install_name.find("@rpath") != std::string::npos)
-          {
-          install_name_is_rpath = true;
-          }
-        }
-      }
-    }
-
-  if(!install_name_is_rpath && !macosx_rpath)
-    {
-    return false;
-    }
-
-  if(!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG"))
-    {
-    cmOStringStream w;
-    w << "Attempting to use";
-    if(macosx_rpath)
-      {
-      w << " MACOSX_RPATH";
-      }
-    else
-      {
-      w << " @rpath";
-      }
-    w << " without CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG being set.";
-    w << "  This could be because you are using a Mac OS X version";
-    w << " less than 10.5 or because CMake's platform configuration is";
-    w << " corrupt.";
-    cmake* cm = this->Makefile->GetCMakeInstance();
-    cm->IssueMessage(cmake::FATAL_ERROR, w.str(), this->GetBacktrace());
-    }
-
-  return true;
-}
-
-//----------------------------------------------------------------------------
-bool cmTarget::MacOSXRpathInstallNameDirDefault() const
-{
-  // we can't do rpaths when unsupported
-  if(!this->Makefile->IsSet("CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG"))
-    {
-    return false;
-    }
-
-  const char* macosx_rpath_str = this->GetProperty("MACOSX_RPATH");
-  if(macosx_rpath_str)
-    {
-    return this->GetPropertyAsBool("MACOSX_RPATH");
-    }
-
-  cmPolicies::PolicyStatus cmp0042 = this->GetPolicyStatusCMP0042();
-
-  if(cmp0042 == cmPolicies::WARN)
-    {
-    this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
-      AddCMP0042WarnTarget(this->GetName());
-    }
-
-  if(cmp0042 == cmPolicies::NEW)
-    {
-    return true;
-    }
-
-  return false;
-}
-
-//----------------------------------------------------------------------------
 bool cmTarget::IsImportedSharedLibWithoutSOName(const char* config) const
 {
   if(this->IsImported() && this->GetType() == cmTarget::SHARED_LIBRARY)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 1df0f0f..48bead1 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -284,12 +284,6 @@ public:
    */
   bool FindSourceFiles();
 
-  /** Whether this library has \@rpath and platform supports it.  */
-  bool HasMacOSXRpathInstallNameDir(const char* config) const;
-
-  /** Whether this library defaults to \@rpath.  */
-  bool MacOSXRpathInstallNameDirDefault() const;
-
   /** Test for special case of a third-party shared library that has
       no soname at all.  */
   bool IsImportedSharedLibWithoutSOName(const char* config) const;

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list