[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1248-g607d6b1

Brad King brad.king at kitware.com
Fri Dec 7 14:04:26 EST 2012


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  607d6b144c7c7a4622e1bbff1099aa0fc6a1e221 (commit)
       via  11d6894279126d6789ebb4d14917a10829a4da1d (commit)
       via  a44480712cc9828c0cfc03db3108c220236d4da1 (commit)
      from  dcb4c478e1fb75c7b88e00c4fbf37275cf5052c4 (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=607d6b144c7c7a4622e1bbff1099aa0fc6a1e221
commit 607d6b144c7c7a4622e1bbff1099aa0fc6a1e221
Merge: dcb4c47 11d6894
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 14:04:24 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 7 14:04:24 2012 -0500

    Merge topic 'xcode-framework-paths' into next
    
    11d6894 Makefile: Use modern link information for framework search paths
    a444807 Xcode: Remove old incorrect framework path computation (#13397)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=11d6894279126d6789ebb4d14917a10829a4da1d
commit 11d6894279126d6789ebb4d14917a10829a4da1d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:27:52 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 7 13:27:52 2012 -0500

    Makefile: Use modern link information for framework search paths
    
    Use cmComputeLinkInformation::GetFrameworkPaths to get the list of
    framework paths needed by the linker.  Drop the now unused framework
    information from the old-style cmTarget link dependency analysis.

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2b89c79..9bf6b7d 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1550,10 +1550,10 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
   this->LocalGenerator->GetIncludeDirectories(includes,
                                               this->GeneratorTarget,
                                               "C", config);
-  std::vector<std::string>::iterator i;
   // check all include directories for frameworks as this
   // will already have added a -F for the framework
-  for(i = includes.begin(); i != includes.end(); ++i)
+  for(std::vector<std::string>::iterator i = includes.begin();
+      i != includes.end(); ++i)
     {
     if(this->Target->NameResolvesToFramework(i->c_str()))
       {
@@ -1565,17 +1565,21 @@ std::string cmMakefileTargetGenerator::GetFrameworkFlags()
     }
 
   std::string flags;
-  std::vector<std::string>& frameworks = this->Target->GetFrameworks();
-  for(i = frameworks.begin();
-      i != frameworks.end(); ++i)
+  const char* cfg = this->LocalGenerator->ConfigurationName.c_str();
+  if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(cfg))
     {
-    if(emitted.insert(*i).second)
+    std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
+    for(std::vector<std::string>::const_iterator i = frameworks.begin();
+        i != frameworks.end(); ++i)
       {
-      flags += "-F";
-      flags += this->Convert(i->c_str(),
-                             cmLocalGenerator::START_OUTPUT,
-                             cmLocalGenerator::SHELL, true);
-      flags += " ";
+      if(emitted.insert(*i).second)
+        {
+        flags += "-F";
+        flags += this->Convert(i->c_str(),
+                               cmLocalGenerator::START_OUTPUT,
+                               cmLocalGenerator::SHELL, true);
+        flags += " ";
+        }
       }
     }
   return flags;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index be20464..de3b23c 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2093,26 +2093,6 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname)
 }
 
 //----------------------------------------------------------------------------
-bool cmTarget::AddFramework(const std::string& libname, LinkLibraryType)
-{
-  if(this->NameResolvesToFramework(libname.c_str()))
-    {
-    std::string frameworkDir = libname;
-    frameworkDir += "/../";
-    frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
-    std::vector<std::string>::iterator i =
-      std::find(this->Frameworks.begin(),
-                this->Frameworks.end(), frameworkDir);
-    if(i == this->Frameworks.end())
-      {
-      this->Frameworks.push_back(frameworkDir);
-      }
-    return true;
-    }
-  return false;
-}
-
-//----------------------------------------------------------------------------
 void cmTarget::AddLinkLibrary(cmMakefile& mf,
                               const char *target, const char* lib,
                               LinkLibraryType llt)
@@ -2122,7 +2102,6 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
     {
     return;
     }
-  this->AddFramework(lib, llt);
   cmTarget::LibraryID tmp;
   tmp.first = lib;
   tmp.second = llt;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 9efd638..0dfbc68 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -109,9 +109,6 @@ public:
   std::vector<cmCustomCommand> &GetPostBuildCommands()
     {return this->PostBuildCommands;}
 
-  ///! Return the list of frameworks being linked to this target
-  std::vector<std::string> &GetFrameworks() {return this->Frameworks;}
-
   /**
    * Get the list of the source files used by this target
    */
@@ -179,7 +176,6 @@ public:
 
   // Check to see if a library is a framework and treat it different on Mac
   bool NameResolvesToFramework(const std::string& libname);
-  bool AddFramework(const std::string& lib, LinkLibraryType llt);
   void AddLinkLibrary(cmMakefile& mf,
                       const char *target, const char* lib,
                       LinkLibraryType llt);
@@ -569,7 +565,6 @@ private:
   LinkLibraryVectorType LinkLibraries;
   LinkLibraryVectorType PrevLinkedLibraries;
   bool LinkLibrariesAnalyzed;
-  std::vector<std::string> Frameworks;
   std::vector<std::string> LinkDirectories;
   std::set<cmStdString> LinkDirectoriesEmmitted;
   bool HaveInstallRule;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a44480712cc9828c0cfc03db3108c220236d4da1
commit a44480712cc9828c0cfc03db3108c220236d4da1
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:06:20 2012 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Dec 7 13:21:57 2012 -0500

    Xcode: Remove old incorrect framework path computation (#13397)
    
    The Xcode generator originally generated FRAMEWORK_SEARCH_PATHS from the
    frameworks in the include_directories path and discovered during
    old-style link libraries analysis, added by commit commit 82bb6fae (add
    framework support to FIND_FILE, 2005-12-27).  Later a second setting was
    added by commit 2ed6191f (add initial xcode framework stuff,
    2007-05-08).  Then commit 96fd5909 (Implement linking with paths to
    library files, 2008-01-22) updated the second setting to use the results
    of full modern link dependency analysis.
    
    The value computed for the original setting of FRAMEWORK_SEARCH_PATHS is
    not correct.  We already handle include directories separately.  The
    old-style link libraries analysis did not include framework directories
    from dependencies.  Remove the original setting because it gets in the
    way of the second, modern logic to set it.

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 9bbeeaf..cbe6dad 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1971,48 +1971,15 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
     }
 
   BuildObjectListOrString dirs(this, this->XcodeVersion >= 30);
-  BuildObjectListOrString fdirs(this, this->XcodeVersion >= 30);
   std::vector<std::string> includes;
   this->CurrentLocalGenerator->GetIncludeDirectories(includes, gtgt,
                                                      "C", configName);
-  std::set<cmStdString> emitted;
-  emitted.insert("/System/Library/Frameworks");
   for(std::vector<std::string>::iterator i = includes.begin();
       i != includes.end(); ++i)
     {
-    if(this->NameResolvesToFramework(i->c_str()))
-      {
-      std::string frameworkDir = *i;
-      frameworkDir += "/../";
-      frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str());
-      if(emitted.insert(frameworkDir).second)
-        {
-        fdirs.Add(this->XCodeEscapePath(frameworkDir.c_str()).c_str());
-        }
-      }
-    else
-      {
-      std::string incpath =
-        this->XCodeEscapePath(i->c_str());
-      dirs.Add(incpath.c_str());
-      }
-    }
-  std::vector<std::string>& frameworks = target.GetFrameworks();
-  if(frameworks.size())
-    {
-    for(std::vector<std::string>::iterator fmIt = frameworks.begin();
-        fmIt != frameworks.end(); ++fmIt)
-      {
-      if(emitted.insert(*fmIt).second)
-        {
-        fdirs.Add(this->XCodeEscapePath(fmIt->c_str()).c_str());
-        }
-      }
-    }
-  if(!fdirs.IsEmpty())
-    {
-    buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS",
-                                fdirs.CreateList());
+    std::string incpath =
+      this->XCodeEscapePath(i->c_str());
+    dirs.Add(incpath.c_str());
     }
   if(!dirs.IsEmpty())
     {

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

Summary of changes:
 Source/cmGlobalXCodeGenerator.cxx    |   39 ++-------------------------------
 Source/cmMakefileTargetGenerator.cxx |   26 +++++++++++++---------
 Source/cmTarget.cxx                  |   21 ------------------
 Source/cmTarget.h                    |    5 ----
 4 files changed, 18 insertions(+), 73 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list