[Cmake-commits] CMake branch, next, updated. v3.0.0-rc2-1215-gaf28ca0

Stephen Kelly steveire at gmail.com
Wed Mar 19 11:36:57 EDT 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  af28ca0a40bd9df7ba17b3f7de2d279dbbe184cd (commit)
       via  daf00de1a79f05a896b4843ba98700519d9f81cd (commit)
      from  29a33a715a067aef886db919b6ce9cb16a3e3479 (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=af28ca0a40bd9df7ba17b3f7de2d279dbbe184cd
commit af28ca0a40bd9df7ba17b3f7de2d279dbbe184cd
Merge: 29a33a7 daf00de
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 19 11:36:56 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 19 11:36:56 2014 -0400

    Merge topic 'target-sources-refactor' into next
    
    daf00de1 Revert topic.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=daf00de1a79f05a896b4843ba98700519d9f81cd
commit daf00de1a79f05a896b4843ba98700519d9f81cd
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 19 16:35:54 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Mar 19 16:36:09 2014 +0100

    Revert topic.

diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst
index 4ed10e1..231eeed 100644
--- a/Help/command/add_executable.rst
+++ b/Help/command/add_executable.rst
@@ -35,11 +35,8 @@ If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on
 the created target.  See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL`
 target property for details.
 
-Source arguments to ``add_executable`` may use "generator expressions" with
-the syntax ``$<...>``.  See the :manual:`cmake-generator-expressions(7)`
-manual for available expressions.  See the :manual:`cmake-buildsystem(7)`
-manual for more on defining buildsystem properties.
-
+See the :manual:`cmake-buildsystem(7)` manual for more on defining
+buildsystem properties.
 
 --------------------------------------------------------------------------
 
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index e93ef53..0944269 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -39,10 +39,8 @@ If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on
 the created target.  See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL`
 target property for details.
 
-Source arguments to ``add_library`` may use "generator expressions" with
-the syntax ``$<...>``.  See the :manual:`cmake-generator-expressions(7)`
-manual for available expressions.  See the :manual:`cmake-buildsystem(7)`
-manual for more on defining buildsystem properties.
+See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem
+properties.
 
 --------------------------------------------------------------------------
 
diff --git a/Help/command/string.rst b/Help/command/string.rst
index abde6ee..af18825 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -35,7 +35,6 @@ String operations.
   string(FIND <string> <substring> <output variable> [REVERSE])
   string(TIMESTAMP <output variable> [<format string>] [UTC])
   string(MAKE_C_IDENTIFIER <input string> <output variable>)
-  string(GENEX_STRIP <input string> <output variable>)
 
 REGEX MATCH will match the regular expression once and store the match
 in the output variable.
@@ -155,7 +154,3 @@ If no explicit <format string> is given it will default to:
 
 MAKE_C_IDENTIFIER will write a string which can be used as an
 identifier in C.
-
-``GENEX_STRIP`` will strip any
-:manual:`generator expressions <cmake-generator-expressions(7)>` from the
-``input string`` and store the result in the ``output variable``.
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 17263d4..ac8c3f8 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -188,6 +188,3 @@ property is non-empty::
   Content of ``...`` converted to upper case.
 ``$<MAKE_C_IDENTIFIER:...>``
   Content of ``...`` converted to a C identifier.
-``$<TARGET_OBJECTS:objLib>``
-  List of objects resulting from build of ``objLib``. ``objLib`` must be an
-  object of type ``OBJECT_LIBRARY``.
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index b763882..8650a58 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -102,4 +102,3 @@ All Policies
    /policy/CMP0048
    /policy/CMP0049
    /policy/CMP0050
-   /policy/CMP0051
diff --git a/Help/policy/CMP0051.rst b/Help/policy/CMP0051.rst
deleted file mode 100644
index 7d85929..0000000
--- a/Help/policy/CMP0051.rst
+++ /dev/null
@@ -1,24 +0,0 @@
-CMP0051
--------
-
-List TARGET_OBJECTS in SOURCES target property.
-
-CMake 3.0 and lower did not include the ``TARGET_OBJECTS``
-:manual:`generator expression <cmake-generator-expressions(7)>` when
-returning the :prop_tgt:`SOURCES` target property.
-
-Configure-time CMake code is not able to handle generator expressions.  If
-using the :prop_tgt:`SOURCES` target property at configure time, it may be
-necessary to first remove generator expressions using the
-:command:`string(STRIP_GENEX)` command.  Generate-time CMake code such as
-:command:`file(GENERATE)` can handle the content without stripping.
-
-The ``OLD`` behavior for this policy is to omit ``TARGET_OBJECTS``
-expressions from the :prop_tgt:`SOURCES` target property.  The ``NEW``
-behavior for this policy is to include ``TARGET_OBJECTS`` expressions
-in the output.
-
-This policy was introduced in CMake version 3.1.
-CMake version |release| warns when the policy is not set and uses
-``OLD`` behavior.  Use the :command:`cmake_policy` command to set it
-to ``OLD`` or ``NEW`` explicitly.
diff --git a/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst b/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst
deleted file mode 100644
index 853a803..0000000
--- a/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-file-GENERATE-TARGET_OBJECTS
-----------------------------
-
-* The :command:`file(GENERATE)` subcommand learned to evaluate the
-  ``TARGET_OBJECTS``
-  :manual:`generator expression <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/string-GENEX_STRIP.rst b/Help/release/dev/string-GENEX_STRIP.rst
deleted file mode 100644
index b5b1074..0000000
--- a/Help/release/dev/string-GENEX_STRIP.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-string-GENEX_STRIP
-------------------
-
-* The :command:`string` command learned a new ``GENEX_STRIP`` subcommand
-  which removes
-  :manual:`generator expression <cmake-generator-expressions(7)>`.
diff --git a/Help/release/dev/target-SOURCES-genex.rst b/Help/release/dev/target-SOURCES-genex.rst
deleted file mode 100644
index 9a65101..0000000
--- a/Help/release/dev/target-SOURCES-genex.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-target-SOURCES-genex
---------------------
-
-* The :prop_tgt:`SOURCES` target property now contains
-  :manual:`generator expression <cmake-generator-expressions(7)>`
-  such as ``TARGET_OBJECTS`` when read at configure time, if
-  policy :policy:`CMP0051` is ``NEW``.
-
-* The :prop_tgt:`SOURCES` target property now generally supports
-  :manual:`generator expression <cmake-generator-expressions(7)>`.  The
-  generator expressions may be used in the :command:`add_library` and
-  :command:`add_executable` commands.
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 723988b..b4dbce7 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -16,7 +16,6 @@
 #include "cmLocalGenerator.h"
 #include "cmMakefile.h"
 #include "cmSystemTools.h"
-#include "cmSourceFile.h"
 #include "cmTarget.h"
 #include "cmake.h"
 
@@ -214,34 +213,6 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
   {
   std::set<std::string> emitted;
   {
-  cmGeneratorTarget* gt = depender->GetMakefile()->GetLocalGenerator()
-                                  ->GetGlobalGenerator()
-                                  ->GetGeneratorTarget(depender);
-  std::vector<cmSourceFile const*> objectFiles;
-  gt->GetExternalObjects(objectFiles);
-  for(std::vector<cmSourceFile const*>::const_iterator
-      it = objectFiles.begin(); it != objectFiles.end(); ++it)
-    {
-    std::string objLib = (*it)->GetObjectLibrary();
-    if (emitted.insert(objLib).second)
-      {
-      if(depender->GetType() != cmTarget::EXECUTABLE &&
-          depender->GetType() != cmTarget::STATIC_LIBRARY &&
-          depender->GetType() != cmTarget::SHARED_LIBRARY &&
-          depender->GetType() != cmTarget::MODULE_LIBRARY)
-        {
-        this->GlobalGenerator->GetCMakeInstance()
-          ->IssueMessage(cmake::FATAL_ERROR,
-                          "Only executables and non-OBJECT libraries may "
-                          "reference target objects.",
-                          depender->GetBacktrace());
-        return;
-        }
-      const_cast<cmTarget*>(depender)->AddUtility(objLib);
-      }
-    }
-  }
-  {
   std::vector<std::string> tlibs;
   depender->GetDirectLinkLibraries("", tlibs, depender);
   // A target should not depend on itself.
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index e2b114a..0a36b82 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -168,7 +168,7 @@ void cmFLTKWrapUICommand::FinalPass()
     for(size_t classNum = 0; classNum < lastHeadersClass; classNum++)
       {
       this->Makefile->GetTargets()[this->Target]
-        .AddSource(this->GeneratedSourcesClasses[classNum]->GetFullPath());
+        .AddSourceFile(this->GeneratedSourcesClasses[classNum]);
       }
     }
 }
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 669694c..14b2a1a 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -15,8 +15,6 @@
 #include "cmGeneratorExpressionParser.h"
 #include "cmGeneratorExpressionDAGChecker.h"
 #include "cmGeneratorExpression.h"
-#include "cmLocalGenerator.h"
-#include "cmSourceFile.h"
 
 #include <cmsys/String.h>
 
@@ -1242,67 +1240,6 @@ static const struct TargetNameNode : public cmGeneratorExpressionNode
 } targetNameNode;
 
 //----------------------------------------------------------------------------
-static const struct TargetObjectsNode : public cmGeneratorExpressionNode
-{
-  TargetObjectsNode() {}
-
-  std::string Evaluate(const std::vector<std::string> &parameters,
-                       cmGeneratorExpressionContext *context,
-                       const GeneratorExpressionContent *content,
-                       cmGeneratorExpressionDAGChecker *) const
-  {
-    std::string tgtName = parameters.front();
-    cmGeneratorTarget* gt =
-                context->Makefile->FindGeneratorTargetToUse(tgtName.c_str());
-    if (!gt)
-      {
-      cmOStringStream e;
-      e << "Objects of target \"" << tgtName
-        << "\" referenced but no such target exists.";
-      reportError(context, content->GetOriginalExpression(), e.str());
-      return std::string();
-      }
-    if (gt->GetType() != cmTarget::OBJECT_LIBRARY)
-      {
-      cmOStringStream e;
-      e << "Objects of target \"" << tgtName
-        << "\" referenced but is not an OBJECT library.";
-      reportError(context, content->GetOriginalExpression(), e.str());
-      return std::string();
-      }
-
-    std::vector<cmSourceFile const*> objectSources;
-    gt->GetObjectSources(objectSources);
-    std::map<cmSourceFile const*, std::string> mapping;
-
-    for(std::vector<cmSourceFile const*>::const_iterator it
-        = objectSources.begin(); it != objectSources.end(); ++it)
-      {
-      mapping[*it];
-      }
-
-    gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
-
-    std::string obj_dir = gt->ObjectDirectory;
-    std::string result;
-    const char* sep = "";
-    for(std::map<cmSourceFile const*, std::string>::const_iterator it
-        = mapping.begin(); it != mapping.end(); ++it)
-      {
-      assert(!it->second.empty());
-      result += sep;
-      std::string objFile = obj_dir + it->second;
-      cmSourceFile* sf = context->Makefile->GetOrCreateSource(objFile, true);
-      sf->SetObjectLibrary(tgtName);
-      sf->SetProperty("EXTERNAL_OBJECT", "1");
-      result += objFile;
-      sep = ";";
-      }
-    return result;
-  }
-} targetObjectsNode;
-
-//----------------------------------------------------------------------------
 static const char* targetPolicyWhitelist[] = {
   0
 #define TARGET_POLICY_STRING(POLICY) \
@@ -1656,7 +1593,6 @@ cmGeneratorExpressionNode* GetNode(const std::string &identifier)
     nodeMap["SEMICOLON"] = &semicolonNode;
     nodeMap["TARGET_PROPERTY"] = &targetPropertyNode;
     nodeMap["TARGET_NAME"] = &targetNameNode;
-    nodeMap["TARGET_OBJECTS"] = &targetObjectsNode;
     nodeMap["TARGET_POLICY"] = &targetPolicyNode;
     nodeMap["BUILD_INTERFACE"] = &buildInterfaceNode;
     nodeMap["INSTALL_INTERFACE"] = &installInterfaceNode;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 31efb20..2a144c6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -310,38 +310,20 @@ cmGeneratorTarget
 ::GetObjectSources(std::vector<cmSourceFile const*> &data) const
 {
   IMPLEMENT_VISIT(ObjectSources);
-
-  if (!this->Objects.empty())
-    {
-    return;
-    }
-
-  for(std::vector<cmSourceFile const*>::const_iterator it = data.begin();
-      it != data.end(); ++it)
-    {
-    this->Objects[*it];
-    }
-
-  this->LocalGenerator->ComputeObjectFilenames(this->Objects, this);
-}
-
-void cmGeneratorTarget::ComputeObjectMapping()
-{
-  if(!this->Objects.empty())
-    {
-    return;
-    }
-  std::vector<cmSourceFile const*> sourceFiles;
-  this->GetObjectSources(sourceFiles);
 }
 
 //----------------------------------------------------------------------------
 const std::string& cmGeneratorTarget::GetObjectName(cmSourceFile const* file)
 {
-  this->ComputeObjectMapping();
   return this->Objects[file];
 }
 
+void cmGeneratorTarget::AddObject(cmSourceFile const* sf,
+                                  std::string const&name)
+{
+    this->Objects[sf] = name;
+}
+
 //----------------------------------------------------------------------------
 void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile const* sf)
 {
@@ -351,7 +333,6 @@ void cmGeneratorTarget::AddExplicitObjectName(cmSourceFile const* sf)
 //----------------------------------------------------------------------------
 bool cmGeneratorTarget::HasExplicitObjectName(cmSourceFile const* file) const
 {
-  const_cast<cmGeneratorTarget*>(this)->ComputeObjectMapping();
   std::set<cmSourceFile const*>::const_iterator it
                                         = this->ExplicitObjectName.find(file);
   return it != this->ExplicitObjectName.end();
@@ -522,6 +503,58 @@ void cmGeneratorTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
 }
 
 //----------------------------------------------------------------------------
+void cmGeneratorTarget::LookupObjectLibraries()
+{
+  std::vector<std::string> const& objLibs =
+    this->Target->GetObjectLibraries();
+  for(std::vector<std::string>::const_iterator oli = objLibs.begin();
+      oli != objLibs.end(); ++oli)
+    {
+    std::string const& objLibName = *oli;
+    if(cmTarget* objLib = this->Makefile->FindTargetToUse(objLibName))
+      {
+      if(objLib->GetType() == cmTarget::OBJECT_LIBRARY)
+        {
+        if(this->Target->GetType() != cmTarget::EXECUTABLE &&
+           this->Target->GetType() != cmTarget::STATIC_LIBRARY &&
+           this->Target->GetType() != cmTarget::SHARED_LIBRARY &&
+           this->Target->GetType() != cmTarget::MODULE_LIBRARY)
+          {
+          this->GlobalGenerator->GetCMakeInstance()
+            ->IssueMessage(cmake::FATAL_ERROR,
+                           "Only executables and non-OBJECT libraries may "
+                           "reference target objects.",
+                           this->Target->GetBacktrace());
+          return;
+          }
+        this->Target->AddUtility(objLib->GetName());
+        this->ObjectLibraries.push_back(objLib);
+        }
+      else
+        {
+        cmOStringStream e;
+        e << "Objects of target \"" << objLibName
+          << "\" referenced but is not an OBJECT library.";
+        this->GlobalGenerator->GetCMakeInstance()
+          ->IssueMessage(cmake::FATAL_ERROR, e.str(),
+                         this->Target->GetBacktrace());
+        return;
+        }
+      }
+    else
+      {
+      cmOStringStream e;
+      e << "Objects of target \"" << objLibName
+        << "\" referenced but no such target exists.";
+      this->GlobalGenerator->GetCMakeInstance()
+        ->IssueMessage(cmake::FATAL_ERROR, e.str(),
+                       this->Target->GetBacktrace());
+      return;
+      }
+    }
+}
+
+//----------------------------------------------------------------------------
 std::string cmGeneratorTarget::GetModuleDefinitionFile() const
 {
   std::string data;
@@ -533,26 +566,9 @@ std::string cmGeneratorTarget::GetModuleDefinitionFile() const
 void
 cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs) const
 {
-  std::vector<cmSourceFile const*> objectFiles;
-  this->GetExternalObjects(objectFiles);
-  std::vector<cmTarget*> objectLibraries;
-  std::set<cmTarget*> emitted;
-  for(std::vector<cmSourceFile const*>::const_iterator
-      it = objectFiles.begin(); it != objectFiles.end(); ++it)
-    {
-    std::string objLib = (*it)->GetObjectLibrary();
-    if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib))
-      {
-      if (emitted.insert(tgt).second)
-        {
-        objectLibraries.push_back(tgt);
-        }
-      }
-    }
-
   for(std::vector<cmTarget*>::const_iterator
-        ti = objectLibraries.begin();
-      ti != objectLibraries.end(); ++ti)
+        ti = this->ObjectLibraries.begin();
+      ti != this->ObjectLibraries.end(); ++ti)
     {
     cmTarget* objLib = *ti;
     cmGeneratorTarget* ogt =
@@ -583,12 +599,12 @@ private:
   cmGlobalGenerator const* GlobalGenerator;
   typedef cmGeneratorTarget::SourceEntry SourceEntry;
   SourceEntry* CurrentEntry;
-  std::queue<std::string> SourceQueue;
-  std::set<std::string> SourcesQueued;
+  std::queue<cmSourceFile*> SourceQueue;
+  std::set<cmSourceFile*> SourcesQueued;
   typedef std::map<std::string, cmSourceFile*> NameMapType;
   NameMapType NameMap;
 
-  void QueueSource(std::string const& name);
+  void QueueSource(cmSourceFile* sf);
   void FollowName(std::string const& name);
   void FollowNames(std::vector<std::string> const& names);
   bool IsUtility(std::string const& dep);
@@ -608,11 +624,11 @@ cmTargetTraceDependencies
   this->CurrentEntry = 0;
 
   // Queue all the source files already specified for the target.
+  std::vector<cmSourceFile*> sources;
   if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
     {
-    std::vector<std::string> sources;
     this->Target->GetSourceFiles(sources);
-    for(std::vector<std::string>::const_iterator si = sources.begin();
+    for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
         si != sources.end(); ++si)
       {
       this->QueueSource(*si);
@@ -632,8 +648,7 @@ void cmTargetTraceDependencies::Trace()
   while(!this->SourceQueue.empty())
     {
     // Get the next source from the queue.
-    std::string src = this->SourceQueue.front();
-    cmSourceFile* sf = this->Makefile->GetSource(src);
+    cmSourceFile* sf = this->SourceQueue.front();
     this->SourceQueue.pop();
     this->CurrentEntry = &this->GeneratorTarget->SourceEntries[sf];
 
@@ -661,14 +676,14 @@ void cmTargetTraceDependencies::Trace()
 }
 
 //----------------------------------------------------------------------------
-void cmTargetTraceDependencies::QueueSource(std::string const& name)
+void cmTargetTraceDependencies::QueueSource(cmSourceFile* sf)
 {
-  if(this->SourcesQueued.insert(name).second)
+  if(this->SourcesQueued.insert(sf).second)
     {
-    this->SourceQueue.push(name);
+    this->SourceQueue.push(sf);
 
     // Make sure this file is in the target.
-    this->Target->AddSource(name);
+    this->Target->AddSourceFile(sf);
     }
 }
 
@@ -690,7 +705,8 @@ void cmTargetTraceDependencies::FollowName(std::string const& name)
       {
       this->CurrentEntry->Depends.push_back(sf);
       }
-    this->QueueSource(sf->GetFullPath());
+
+    this->QueueSource(sf);
     }
 }
 
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 38e6510..53e27c5 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -35,6 +35,7 @@ public:
   void GetObjectSources(std::vector<cmSourceFile const*> &) const;
   const std::string& GetObjectName(cmSourceFile const* file);
 
+  void AddObject(cmSourceFile const* sf, std::string const&name);
   bool HasExplicitObjectName(cmSourceFile const* file) const;
   void AddExplicitObjectName(cmSourceFile const* sf);
 
@@ -46,8 +47,6 @@ public:
   void GetCustomCommands(std::vector<cmSourceFile const*>&) const;
   void GetExpectedResxHeaders(std::set<std::string>&) const;
 
-  void ComputeObjectMapping();
-
   cmTarget* Target;
   cmMakefile* Makefile;
   cmLocalGenerator* LocalGenerator;
@@ -85,6 +84,8 @@ public:
    */
   void TraceDependencies();
 
+  void LookupObjectLibraries();
+
   /** Get sources that must be built before the given source.  */
   std::vector<cmSourceFile*> const*
   GetSourceDepends(cmSourceFile const* sf) const;
@@ -124,8 +125,9 @@ private:
   typedef std::map<cmSourceFile const*, SourceEntry> SourceEntriesType;
   SourceEntriesType SourceEntries;
 
-  mutable std::map<cmSourceFile const*, std::string> Objects;
+  std::map<cmSourceFile const*, std::string> Objects;
   std::set<cmSourceFile const*> ExplicitObjectName;
+  std::vector<cmTarget*> ObjectLibraries;
   mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;
 
   void ConstructSourceFileFlags() const;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 66ccf39..5b6d729 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -216,11 +216,6 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file)
   return false;
 }
 
-void cmGlobalGenerator::ForceLinkerLanguages()
-{
-
-}
-
 bool
 cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const
 {
@@ -1199,8 +1194,6 @@ void cmGlobalGenerator::Generate()
   // Create per-target generator information.
   this->CreateGeneratorTargets();
 
-  this->ForceLinkerLanguages();
-
 #ifdef CMAKE_BUILD_WITH_CMAKE
   for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
        ++it)
@@ -1222,6 +1215,8 @@ void cmGlobalGenerator::Generate()
     this->LocalGenerators[i]->GenerateTargetManifest();
     }
 
+  this->ComputeGeneratorTargetObjects();
+
   this->ProcessEvaluationFiles();
 
   // Compute the inter-target dependencies.
@@ -1412,7 +1407,6 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf)
     {
     cmTarget* t = &ti->second;
     cmGeneratorTarget* gt = new cmGeneratorTarget(t);
-    this->ComputeTargetObjectDirectory(gt);
     this->GeneratorTargets[t] = gt;
     generatorTargets[t] = gt;
     }
@@ -1438,6 +1432,29 @@ void cmGlobalGenerator::CreateGeneratorTargets()
     }
 }
 
+//----------------------------------------------------------------------------
+void cmGlobalGenerator::ComputeGeneratorTargetObjects()
+{
+  // Construct per-target generator information.
+  for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
+    {
+    cmMakefile *mf = this->LocalGenerators[i]->GetMakefile();
+    cmGeneratorTargetsType targets = mf->GetGeneratorTargets();
+    for(cmGeneratorTargetsType::iterator ti = targets.begin();
+        ti != targets.end(); ++ti)
+      {
+      if (ti->second->Target->IsImported()
+          || ti->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
+        {
+        continue;
+        }
+      cmGeneratorTarget* gt = ti->second;
+      this->ComputeTargetObjectDirectory(gt);
+      gt->LookupObjectLibraries();
+      this->ComputeTargetObjects(gt);
+      }
+    }
+}
 
 //----------------------------------------------------------------------------
 void cmGlobalGenerator::ClearGeneratorMembers()
@@ -1499,6 +1516,29 @@ cmGlobalGenerator::GetGeneratorTarget(cmTarget const* t) const
 }
 
 //----------------------------------------------------------------------------
+void cmGlobalGenerator::ComputeTargetObjects(cmGeneratorTarget* gt) const
+{
+  std::vector<cmSourceFile const*> objectSources;
+  gt->GetObjectSources(objectSources);
+
+  std::map<cmSourceFile const*, std::string> mapping;
+  for(std::vector<cmSourceFile const*>::const_iterator it
+      = objectSources.begin(); it != objectSources.end(); ++it)
+    {
+    mapping[*it];
+    }
+
+  gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+  for(std::map<cmSourceFile const*, std::string>::const_iterator it
+      = mapping.begin(); it != mapping.end(); ++it)
+    {
+    assert(!it->second.empty());
+    gt->AddObject(it->first, it->second);
+    }
+}
+
+//----------------------------------------------------------------------------
 void cmGlobalGenerator::ComputeTargetObjectDirectory(cmGeneratorTarget*) const
 {
 }
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 54f5f3b..49a418d 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -423,8 +423,6 @@ private:
   void WriteSummary(cmTarget* target);
   void FinalizeTargetCompileInfo();
 
-  virtual void ForceLinkerLanguages();
-
   virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
                                    const char* envVar) const;
   void CheckCompilerIdCompatibility(cmMakefile* mf,
@@ -444,6 +442,8 @@ private:
   friend class cmake;
   void CreateGeneratorTargets(cmMakefile* mf);
   void CreateGeneratorTargets();
+  void ComputeGeneratorTargetObjects();
+  void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
   void ClearGeneratorMembers();
 
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index e80df84..ab4380c 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -16,7 +16,6 @@
 #include "cmVisualStudioWCEPlatformParser.h"
 #include "cmake.h"
 #include "cmGeneratedFileStream.h"
-#include "cmSourceFile.h"
 
 static const char vs8generatorName[] = "Visual Studio 8 2005";
 
@@ -324,7 +323,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
        no_main_dependency, commandLines, "Checking Build System",
        no_working_directory, true))
     {
-    tgt->AddSource(file->GetFullPath());
+    tgt->AddSourceFile(file);
     }
   else
     {
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index d9d4927..d4eb85b 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -343,6 +343,7 @@ void cmGlobalXCodeGenerator::Generate()
     // add ALL_BUILD, INSTALL, etc
     this->AddExtraTargets(root, it->second);
     }
+  this->ForceLinkerLanguages();
   this->cmGlobalGenerator::Generate();
   if(cmSystemTools::GetErrorOccuredFlag())
     {
@@ -411,7 +412,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
   std::string listfile = mf->GetStartDirectory();
   listfile += "/";
   listfile += "CMakeLists.txt";
-  allbuild->AddSourceCMP0049(listfile.c_str());
+  allbuild->AddSource(listfile.c_str());
 
   // Add XCODE depend helper
   std::string dir = mf->GetCurrentOutputDirectory();
@@ -494,7 +495,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
       listfile = lg->GetMakefile()->GetStartDirectory();
       listfile += "/";
       listfile += "CMakeLists.txt";
-      target.AddSourceCMP0049(listfile.c_str());
+      target.AddSource(listfile.c_str());
       }
     }
 }
@@ -987,8 +988,6 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
     cmtarget.GetSourceFiles(classes);
     std::sort(classes.begin(), classes.end(), cmSourceFilePathCompare());
 
-    gtgt->ComputeObjectMapping();
-
     std::vector<cmXCodeObject*> externalObjFiles;
     std::vector<cmXCodeObject*> headerFiles;
     std::vector<cmXCodeObject*> resourceFiles;
@@ -1009,10 +1008,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
       if(filetype &&
          filetype->GetString() == "compiled.mach-o.objfile")
         {
-        if ((*i)->GetObjectLibrary().empty())
-          {
-          externalObjFiles.push_back(xsf);
-          }
+        externalObjFiles.push_back(xsf);
         }
       else if(this->IsHeaderFile(*i) ||
         (tsFlags.Type == cmGeneratorTarget::SourceFileTypePrivateHeader) ||
@@ -1264,7 +1260,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmTarget& cmtarget)
   if(cmSourceFile* sf = mf->GetOrCreateSource(fname.c_str()))
     {
     sf->SetProperty("LANGUAGE", llang.c_str());
-    cmtarget.AddSource(fname);
+    cmtarget.AddSourceFile(sf);
     }
 }
 
@@ -2938,8 +2934,8 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
       if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
         {
         std::string plist = this->ComputeInfoPListLocation(cmtarget);
-        mf->GetOrCreateSource(plist, true);
-        cmtarget.AddSource(plist);
+        cmSourceFile* sf = mf->GetOrCreateSource(plist.c_str(), true);
+        cmtarget.AddSourceFile(sf);
         }
 
       std::vector<cmSourceFile*> classes;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 42c9fce..c63de79 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -753,8 +753,8 @@ void cmLocalGenerator::AddBuildTargetRule(const std::string& llang,
     comment.c_str(),
     this->Makefile->GetStartOutputDirectory()
     );
-  this->Makefile->GetSource(targetFullPath);
-  target.Target->AddSource(targetFullPath);
+  target.Target->AddSourceFile
+    (this->Makefile->GetSource(targetFullPath));
 }
 
 
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index e3ab142..2ab25cc 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -255,7 +255,7 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
                                            no_working_directory, true);
   if(cmSourceFile* file = this->Makefile->GetSource(makefileIn.c_str()))
     {
-    tgt.AddSource(makefileIn);
+    tgt.AddSourceFile(file);
     }
   else
     {
@@ -591,7 +591,7 @@ cmLocalVisualStudio6Generator
        origCommand.GetCommandLines(), comment,
        origCommand.GetWorkingDirectory().c_str()))
     {
-    target.AddSource(outsf->GetFullPath());
+    target.AddSourceFile(outsf);
     }
 
   // Replace the dependencies with the output of this rule so that the
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index e8562ca..52524aa 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -117,7 +117,7 @@ void cmLocalVisualStudio7Generator::AddCMakeListsRules()
         {
         if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET)
           {
-          l->second.AddSource(sf->GetFullPath());
+          l->second.AddSourceFile(sf);
           }
         }
       }
@@ -153,7 +153,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
            force.c_str(), no_depends, no_main_dependency,
            force_commands, " ", 0, true))
         {
-        tgt.AddSource(file->GetFullPath());
+        tgt.AddSourceFile(file);
         }
       }
     }
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index d3a3c16..58625fb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1174,7 +1174,7 @@ cmMakefile::AddCustomCommandOldStyle(const std::string& target,
       {
       if (this->Targets.find(target) != this->Targets.end())
         {
-        this->Targets[target].AddSource(sf->GetFullPath());
+        this->Targets[target].AddSourceFile(sf);
         }
       else
         {
@@ -1258,7 +1258,7 @@ cmMakefile::AddUtilityCommand(const std::string& utilityName,
                                  commandLines, comment,
                                  workingDirectory, no_replace,
                                  escapeOldStyle);
-  cmSourceFile* sf = target->AddSourceCMP0049(force);
+  cmSourceFile* sf = target->AddSource(force);
 
   // The output is not actually created so mark it symbolic.
   if(sf)
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index c520f9e..6759d05 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -202,6 +202,9 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
     // Generate this object file's rule file.
     this->WriteObjectRuleFiles(**si);
     }
+
+  // Add object library contents as external objects.
+  this->GeneratorTarget->UseObjectLibraries(this->ExternalObjects);
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index ae3bff4..4319f3c 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -520,6 +520,17 @@ cmNinjaTargetGenerator
     this->ModuleDefinitionFile = this->ConvertToNinjaPath(def.c_str());
     }
 
+  {
+  // Add object library contents as external objects.
+  std::vector<std::string> objs;
+  this->GeneratorTarget->UseObjectLibraries(objs);
+  for(std::vector<std::string>::iterator oi = objs.begin();
+      oi != objs.end(); ++oi)
+    {
+    this->Objects.push_back(ConvertToNinjaPath(oi->c_str()));
+    }
+  }
+
   this->GetBuildFileStream() << "\n";
 }
 
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 226d6c6..2bd553f 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -343,11 +343,6 @@ cmPolicies::cmPolicies()
     CMP0050, "CMP0050",
     "Disallow add_custom_command SOURCE signatures.",
     3,0,0, cmPolicies::WARN);
-
-  this->DefinePolicy(
-    CMP0051, "CMP0051",
-    "List TARGET_OBJECTS in SOURCES target property.",
-    3,0,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 7a08a34..b77235d 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -104,7 +104,6 @@ public:
     CMP0048, ///< project() command manages VERSION variables
     CMP0049, ///< Do not expand variables in target source entries
     CMP0050, ///< Disallow add_custom_command SOURCE signatures
-    CMP0051, ///< List TARGET_OBJECTS in SOURCES target property
 
     /** \brief Always the last entry.
      *
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index c957306..7b11b61 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -187,11 +187,13 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmTarget* target)
     mocCppFile += "/";
     mocCppFile += automocTargetName;
     mocCppFile += ".cpp";
-    makefile->GetOrCreateSource(mocCppFile, true);
+    cmSourceFile* mocCppSource = makefile->GetOrCreateSource(
+                                                          mocCppFile,
+                                                          true);
     makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
                             mocCppFile.c_str(), false);
 
-    target->AddSource(mocCppFile);
+    target->AddSourceFile(mocCppSource);
     }
   // create a custom target for running generators at buildtime:
   std::string autogenTargetName = getAutogenTargetName(target);
@@ -477,7 +479,7 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
   const char *skipMocSep = "";
   const char *skipUicSep = "";
 
-  std::vector<std::string> newRccFiles;
+  std::vector<cmSourceFile*> newRccFiles;
 
   for(std::vector<cmSourceFile*>::const_iterator fileIt = srcFiles.begin();
       fileIt != srcFiles.end();
@@ -510,8 +512,9 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
         rcc_output_file += "/qrc_" + basename + ".cpp";
         makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
                                 rcc_output_file.c_str(), false);
-        makefile->GetOrCreateSource(rcc_output_file, true);
-        newRccFiles.push_back(rcc_output_file);
+        cmSourceFile* rccCppSource
+                = makefile->GetOrCreateSource(rcc_output_file, true);
+        newRccFiles.push_back(rccCppSource);
         }
       }
 
@@ -543,11 +546,11 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
       }
     }
 
-  for(std::vector<std::string>::const_iterator fileIt = newRccFiles.begin();
+  for(std::vector<cmSourceFile*>::const_iterator fileIt = newRccFiles.begin();
       fileIt != newRccFiles.end();
       ++fileIt)
     {
-    const_cast<cmTarget*>(target)->AddSource(*fileIt);
+    const_cast<cmTarget*>(target)->AddSourceFile(*fileIt);
     }
 }
 
diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx
index 0ab30a2..b9b6251 100644
--- a/Source/cmSourceFile.cxx
+++ b/Source/cmSourceFile.cxx
@@ -39,18 +39,6 @@ std::string const& cmSourceFile::GetExtension() const
 }
 
 //----------------------------------------------------------------------------
-void cmSourceFile::SetObjectLibrary(std::string const& objlib)
-{
-  this->ObjectLibrary = objlib;
-}
-
-//----------------------------------------------------------------------------
-std::string cmSourceFile::GetObjectLibrary() const
-{
-  return this->ObjectLibrary;
-}
-
-//----------------------------------------------------------------------------
 std::string cmSourceFile::GetLanguage()
 {
   // If the language was set explicitly by the user then use it.
diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h
index 755a2cf..17c96ac 100644
--- a/Source/cmSourceFile.h
+++ b/Source/cmSourceFile.h
@@ -97,9 +97,6 @@ public:
    */
   bool Matches(cmSourceFileLocation const&);
 
-  void SetObjectLibrary(std::string const& objlib);
-  std::string GetObjectLibrary() const;
-
 private:
   cmSourceFileLocation Location;
   cmPropertyMap Properties;
@@ -108,7 +105,6 @@ private:
   std::string Language;
   std::string FullPath;
   bool FindFullPathFailed;
-  std::string ObjectLibrary;
 
   bool FindFullPath(std::string* error);
   bool TryFullPath(const std::string& path, const std::string& ext);
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx
index 3e78b29..30a53cb 100644
--- a/Source/cmSourceFileLocation.cxx
+++ b/Source/cmSourceFileLocation.cxx
@@ -16,42 +16,6 @@
 #include "cmGlobalGenerator.h"
 #include "cmSystemTools.h"
 
-#include "assert.h"
-
-//----------------------------------------------------------------------------
-cmSourceFileLocation::cmSourceFileLocation()
-  : Makefile(0), AmbiguousDirectory(true), AmbiguousExtension(true)
-{
-
-}
-
-//----------------------------------------------------------------------------
-cmSourceFileLocation::cmSourceFileLocation(const cmSourceFileLocation& loc)
-  : Makefile(loc.Makefile)
-{
-  this->AmbiguousDirectory = loc.AmbiguousDirectory;
-  this->AmbiguousExtension = loc.AmbiguousExtension;
-  this->Directory = loc.Directory;
-  this->Name = loc.Name;
-}
-
-//----------------------------------------------------------------------------
-cmSourceFileLocation&
-cmSourceFileLocation::operator=(const cmSourceFileLocation& loc)
-{
-  if(this == &loc)
-    {
-    return *this;
-    }
-  this->Makefile = loc.Makefile;
-  this->AmbiguousDirectory = loc.AmbiguousDirectory;
-  this->AmbiguousExtension = loc.AmbiguousExtension;
-  this->Directory = loc.Directory;
-  this->Name = loc.Name;
-  this->UpdateExtension(this->Name);
-  return *this;
-}
-
 //----------------------------------------------------------------------------
 cmSourceFileLocation
 ::cmSourceFileLocation(cmMakefile const* mf, const std::string& name)
@@ -95,7 +59,6 @@ void cmSourceFileLocation::Update(cmSourceFileLocation const& loc)
 //----------------------------------------------------------------------------
 void cmSourceFileLocation::DirectoryUseSource()
 {
-  assert(this->Makefile);
   if(this->AmbiguousDirectory)
     {
     this->Directory =
@@ -108,7 +71,6 @@ void cmSourceFileLocation::DirectoryUseSource()
 //----------------------------------------------------------------------------
 void cmSourceFileLocation::DirectoryUseBinary()
 {
-  assert(this->Makefile);
   if(this->AmbiguousDirectory)
     {
     this->Directory =
@@ -121,7 +83,6 @@ void cmSourceFileLocation::DirectoryUseBinary()
 //----------------------------------------------------------------------------
 void cmSourceFileLocation::UpdateExtension(const std::string& name)
 {
-  assert(this->Makefile);
   // Check the extension.
   std::string ext = cmSystemTools::GetFilenameLastExtension(name);
   if(!ext.empty()) { ext = ext.substr(1); }
@@ -191,7 +152,6 @@ bool
 cmSourceFileLocation
 ::MatchesAmbiguousExtension(cmSourceFileLocation const& loc) const
 {
-  assert(this->Makefile);
   // This location's extension is not ambiguous but loc's extension
   // is.  See if the names match as-is.
   if(this->Name == loc.Name)
@@ -228,7 +188,6 @@ cmSourceFileLocation
 //----------------------------------------------------------------------------
 bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc)
 {
-  assert(this->Makefile);
   if(this->AmbiguousExtension && loc.AmbiguousExtension)
     {
     // Both extensions are ambiguous.  Since only the old fixed set of
diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h
index 82a62ab..c83e8c0 100644
--- a/Source/cmSourceFileLocation.h
+++ b/Source/cmSourceFileLocation.h
@@ -34,9 +34,6 @@ public:
    * instance with an initial name.
    */
   cmSourceFileLocation(cmMakefile const* mf, const std::string& name);
-  cmSourceFileLocation();
-  cmSourceFileLocation(const cmSourceFileLocation& loc);
-  cmSourceFileLocation& operator=(const cmSourceFileLocation& loc);
 
   /**
    * Return whether the givne source file location could refers to the
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index ea762eb..7bc7b05 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -101,10 +101,6 @@ bool cmStringCommand
     {
     return this->HandleMakeCIdentifierCommand(args);
     }
-  else if(subCommand == "GENEX_STRIP")
-    {
-    return this->HandleGenexStripCommand(args);
-    }
 
   std::string e = "does not recognize sub-command "+subCommand;
   this->SetError(e);
@@ -814,27 +810,6 @@ bool cmStringCommand
 }
 
 //----------------------------------------------------------------------------
-bool cmStringCommand
-::HandleGenexStripCommand(std::vector<std::string> const& args)
-{
-  if(args.size() != 3)
-    {
-    this->SetError("sub-command GENEX_STRIP requires two arguments.");
-    return false;
-    }
-
-  const std::string& input = args[1];
-
-  std::string result = cmGeneratorExpression::Preprocess(input,
-                        cmGeneratorExpression::StripAllGeneratorExpressions);
-
-  const std::string& variableName = args[2];
-
-  this->Makefile->AddDefinition(variableName, result.c_str());
-  return true;
-}
-
-//----------------------------------------------------------------------------
 bool cmStringCommand::HandleStripCommand(
   std::vector<std::string> const& args)
 {
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 5b7412d..b8053c5 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -75,7 +75,6 @@ protected:
   bool HandleFindCommand(std::vector<std::string> const& args);
   bool HandleTimestampCommand(std::vector<std::string> const& args);
   bool HandleMakeCIdentifierCommand(std::vector<std::string> const& args);
-  bool HandleGenexStripCommand(std::vector<std::string> const& args);
 
   class RegexReplacement
   {
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 61260be..17c8a4d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -150,7 +150,6 @@ public:
   std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
   std::vector<TargetPropertyEntry*> CompileOptionsEntries;
   std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
-  std::vector<TargetPropertyEntry*> SourceEntries;
   std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries;
 
   mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
@@ -543,58 +542,35 @@ bool cmTarget::IsBundleOnApple() const
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::GetSourceFiles(std::vector<std::string> &files) const
+void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
 {
   assert(this->GetType() != INTERFACE_LIBRARY);
-  for(std::vector<cmTargetInternals::TargetPropertyEntry*>::const_iterator
-      si = this->Internal->SourceEntries.begin();
-      si != this->Internal->SourceEntries.end(); ++si)
+  for(std::vector<cmSourceFile*>::const_iterator
+      si = this->SourceFiles.begin();
+      si != this->SourceFiles.end(); ++si)
     {
-    std::vector<std::string> srcs;
-    cmSystemTools::ExpandListArgument((*si)->ge->Evaluate(this->Makefile,
-                                        "",
-                                        false,
-                                        this),
-                                      srcs);
-
-    for(std::vector<std::string>::const_iterator i = srcs.begin();
-        i != srcs.end(); ++i)
+    std::string e;
+    if((*si)->GetFullPath(&e).empty())
       {
-      std::string src = *i;
-      cmSourceFile* sf = this->Makefile->GetOrCreateSource(src);
-      std::string e;
-      src = sf->GetFullPath(&e);
-      if(src.empty())
+      if(!e.empty())
         {
-        if(!e.empty())
-          {
-          cmake* cm = this->Makefile->GetCMakeInstance();
-          cm->IssueMessage(cmake::FATAL_ERROR, e,
-                          this->GetBacktrace());
-          }
-        return;
+        cmake* cm = this->Makefile->GetCMakeInstance();
+        cm->IssueMessage(cmake::FATAL_ERROR, e,
+                         this->GetBacktrace());
         }
-      files.push_back(src);
+      return;
       }
     }
+  files = this->SourceFiles;
 }
 
 //----------------------------------------------------------------------------
-void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
+void cmTarget::AddSourceFile(cmSourceFile* sf)
 {
-  std::vector<std::string> srcs;
-  this->GetSourceFiles(srcs);
-
-  std::set<cmSourceFile*> emitted;
-
-  for(std::vector<std::string>::const_iterator i = srcs.begin();
-      i != srcs.end(); ++i)
+  if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf)
+                                            == this->SourceFiles.end())
     {
-    cmSourceFile* sf = this->Makefile->GetOrCreateSource(*i);
-    if (emitted.insert(sf).second)
-      {
-      files.push_back(sf);
-      }
+    this->SourceFiles.push_back(sf);
     }
 }
 
@@ -607,17 +583,17 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs)
     const char* src = i->c_str();
     if(src[0] == '$' && src[1] == '<')
       {
-      this->AddSource(src);
+      this->ProcessSourceExpression(*i);
       }
     else
       {
-      this->AddSourceCMP0049(src);
+      this->AddSource(src);
       }
     }
 }
 
 //----------------------------------------------------------------------------
-cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s)
+cmSourceFile* cmTarget::AddSource(const std::string& s)
 {
   std::string src = s;
 
@@ -656,90 +632,28 @@ cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s)
         }
       }
     }
-  return this->AddSource(src);
-}
-
-//----------------------------------------------------------------------------
-struct CreateLocation
-{
-  cmMakefile const* Makefile;
-
-  CreateLocation(cmMakefile const* mf)
-    : Makefile(mf)
-  {
-
-  }
-
-  cmSourceFileLocation operator()(const std::string& filename)
-  {
-    return cmSourceFileLocation(this->Makefile, filename);
-  }
-};
 
-//----------------------------------------------------------------------------
-struct LocationMatcher
-{
-  const cmSourceFileLocation& Needle;
-
-  LocationMatcher(const cmSourceFileLocation& needle)
-    : Needle(needle)
-  {
-
-  }
-
-  bool operator()(cmSourceFileLocation &loc)
-  {
-    return loc.Matches(this->Needle);
-  }
-};
-
-
-//----------------------------------------------------------------------------
-struct TargetPropertyEntryFinder
-{
-private:
-  const cmSourceFileLocation& Needle;
-public:
-  TargetPropertyEntryFinder(const cmSourceFileLocation& needle)
-    : Needle(needle)
-  {
-
-  }
-
-  bool operator()(cmTargetInternals::TargetPropertyEntry* entry)
-  {
-    std::vector<std::string> files;
-    cmSystemTools::ExpandListArgument(entry->ge->GetInput(), files);
-    std::vector<cmSourceFileLocation> locations(files.size());
-    std::transform(files.begin(), files.end(), locations.begin(),
-                   CreateLocation(this->Needle.GetMakefile()));
-
-    return std::find_if(locations.begin(), locations.end(),
-        LocationMatcher(this->Needle)) != locations.end();
-  }
-};
+  cmSourceFile* sf = this->Makefile->GetOrCreateSource(src);
+  this->AddSourceFile(sf);
+  return sf;
+}
 
 //----------------------------------------------------------------------------
-cmSourceFile* cmTarget::AddSource(const std::string& src)
+void cmTarget::ProcessSourceExpression(std::string const& expr)
 {
-  cmSourceFileLocation sfl(this->Makefile, src);
-  if (std::find_if(this->Internal->SourceEntries.begin(),
-                   this->Internal->SourceEntries.end(),
-                   TargetPropertyEntryFinder(sfl))
-                                      == this->Internal->SourceEntries.end())
+  if(cmHasLiteralPrefix(expr.c_str(), "$<TARGET_OBJECTS:") &&
+     expr[expr.size()-1] == '>')
     {
-    cmListFileBacktrace lfbt;
-    this->Makefile->GetBacktrace(lfbt);
-    cmGeneratorExpression ge(lfbt);
-    cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(src);
-    this->Internal->SourceEntries.push_back(
-                          new cmTargetInternals::TargetPropertyEntry(cge));
+    std::string objLibName = expr.substr(17, expr.size()-18);
+    this->ObjectLibraries.push_back(objLibName);
     }
-  if (cmGeneratorExpression::Find(src) != std::string::npos)
+  else
     {
-    return 0;
+    cmOStringStream e;
+    e << "Unrecognized generator expression:\n"
+      << "  " << expr;
+    this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
     }
-  return this->Makefile->GetOrCreateSource(src);
 }
 
 //----------------------------------------------------------------------------
@@ -2852,90 +2766,25 @@ const char *cmTarget::GetProperty(const std::string& prop,
     {
     cmOStringStream ss;
     const char* sep = "";
-    typedef cmTargetInternals::TargetPropertyEntry
-                                TargetPropertyEntry;
-    for(std::vector<TargetPropertyEntry*>::const_iterator
-          i = this->Internal->SourceEntries.begin();
-        i != this->Internal->SourceEntries.end(); ++i)
+    for(std::vector<cmSourceFile*>::const_iterator
+          i = this->SourceFiles.begin();
+        i != this->SourceFiles.end(); ++i)
       {
-      std::string entry = (*i)->ge->GetInput();
+      // Separate from the previous list entries.
+      ss << sep;
+      sep = ";";
 
-      std::vector<std::string> files;
-      cmSystemTools::ExpandListArgument(entry, files);
-      for (std::vector<std::string>::const_iterator
-          li = files.begin(); li != files.end(); ++li)
+      // Construct what is known about this source file location.
+      cmSourceFileLocation const& location = (*i)->GetLocation();
+      std::string sname = location.GetDirectory();
+      if(!sname.empty())
         {
-        if(cmHasLiteralPrefix(*li, "$<TARGET_OBJECTS:") &&
-            (*li)[li->size() - 1] == '>')
-          {
-          std::string objLibName = li->substr(17, li->size()-18);
-
-          if (cmGeneratorExpression::Find(objLibName) != std::string::npos)
-            {
-            ss << sep;
-            sep = ";";
-            ss << *li;
-            continue;
-            }
-
-          bool addContent = false;
-          bool noMessage = true;
-          cmOStringStream e;
-          cmake::MessageType messageType = cmake::AUTHOR_WARNING;
-          switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0051))
-            {
-            case cmPolicies::WARN:
-              e << (this->Makefile->GetPolicies()
-                    ->GetPolicyWarning(cmPolicies::CMP0051)) << "\n";
-              noMessage = false;
-            case cmPolicies::OLD:
-              break;
-            case cmPolicies::REQUIRED_ALWAYS:
-            case cmPolicies::REQUIRED_IF_USED:
-            case cmPolicies::NEW:
-              addContent = true;
-            }
-          if (!noMessage)
-            {
-            e << "Target \"" << this->Name << "\" contains $<TARGET_OBJECTS> "
-            "generator expression in its sources list.  This content was not "
-            "previously part of the SOURCES property when that property was "
-            "read at configure time.  Code reading that property needs to be "
-            "adapted to ignore the generator expression using the "
-            "string(GENEX_STRIP) command.";
-            this->Makefile->IssueMessage(messageType, e.str());
-            }
-          if (addContent)
-            {
-            ss << sep;
-            sep = ";";
-            ss << *li;
-            }
-          }
-        else if (cmGeneratorExpression::Find(*li) == std::string::npos)
-          {
-          ss << sep;
-          sep = ";";
-          ss << *li;
-          }
-        else
-          {
-          cmSourceFile *sf = this->Makefile->GetOrCreateSource(*li);
-          // Construct what is known about this source file location.
-          cmSourceFileLocation const& location = sf->GetLocation();
-          std::string sname = location.GetDirectory();
-          if(!sname.empty())
-            {
-            sname += "/";
-            }
-          sname += location.GetName();
-
-          ss << sep;
-          sep = ";";
-          // Append this list entry.
-          ss << sname;
-          }
+        sname += "/";
         }
+      sname += location.GetName();
+
+      // Append this list entry.
+      ss << sname;
       }
     this->Properties.SetProperty("SOURCES", ss.str().c_str(),
                                  cmProperty::TARGET);
@@ -4995,10 +4844,8 @@ bool cmTarget::IsLinkInterfaceDependentNumberMaxProperty(const std::string &p,
 //----------------------------------------------------------------------------
 void cmTarget::GetLanguages(std::set<std::string>& languages) const
 {
-  std::vector<cmSourceFile*> sourceFiles;
-  this->GetSourceFiles(sourceFiles);
   for(std::vector<cmSourceFile*>::const_iterator
-        i = sourceFiles.begin(); i != sourceFiles.end(); ++i)
+        i = this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i)
     {
     const std::string& lang = (*i)->GetLanguage();
     if(!lang.empty())
@@ -5006,53 +4853,6 @@ void cmTarget::GetLanguages(std::set<std::string>& languages) const
       languages.insert(lang);
       }
     }
-
-  std::vector<cmTarget*> objectLibraries;
-  std::vector<cmSourceFile const*> externalObjects;
-  if (this->Makefile->GetGeneratorTargets().empty())
-    {
-    // At configure-time, this method can be called as part of getting the
-    // LOCATION property or to export() a file to be include()d.  However
-    // there is no cmGeneratorTarget at configure-time, so search the SOURCES
-    // for TARGET_OBJECTS instead for backwards compatibility with OLD
-    // behavior of CMP0024 and CMP0026 only.
-    std::vector<std::string> srcs;
-    cmSystemTools::ExpandListArgument(this->GetProperty("SOURCES"), srcs);
-    for(std::vector<std::string>::const_iterator it = srcs.begin();
-        it != srcs.end(); ++it)
-      {
-      if (cmHasLiteralPrefix(*it, "$<TARGET_OBJECTS:")
-          && cmHasLiteralSuffix(*it, ">"))
-        {
-        std::string objLibName = it->substr(17, it->size()-18);
-        if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLibName))
-          {
-          objectLibraries.push_back(tgt);
-          }
-        }
-      }
-    }
-  else
-    {
-    cmGeneratorTarget* gt = this->Makefile->GetLocalGenerator()
-                                ->GetGlobalGenerator()
-                                ->GetGeneratorTarget(this);
-    gt->GetExternalObjects(externalObjects);
-    for(std::vector<cmSourceFile const*>::const_iterator
-          i = externalObjects.begin(); i != externalObjects.end(); ++i)
-      {
-      std::string objLib = (*i)->GetObjectLibrary();
-      if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib))
-        {
-        objectLibraries.push_back(tgt);
-        }
-      }
-    }
-  for(std::vector<cmTarget*>::const_iterator
-      i = objectLibraries.begin(); i != objectLibraries.end(); ++i)
-    {
-    (*i)->GetLanguages(languages);
-    }
 }
 
 //----------------------------------------------------------------------------
@@ -6117,6 +5917,19 @@ cmTarget::ComputeLinkImplementationLanguages(LinkImplementation& impl) const
   std::set<std::string> languages;
   // Get languages used in our source files.
   this->GetLanguages(languages);
+  // Get languages used in object library sources.
+  for(std::vector<std::string>::const_iterator
+      i = this->ObjectLibraries.begin();
+      i != this->ObjectLibraries.end(); ++i)
+    {
+    if(cmTarget* objLib = this->Makefile->FindTargetToUse(*i))
+      {
+      if(objLib->GetType() == cmTarget::OBJECT_LIBRARY)
+        {
+        objLib->GetLanguages(languages);
+        }
+      }
+    }
   // Copy the set of langauges to the link implementation.
   for(std::set<std::string>::iterator li = languages.begin();
       li != languages.end(); ++li)
@@ -6582,7 +6395,6 @@ cmTargetInternalPointer::~cmTargetInternalPointer()
   deleteAndClear(this->Pointer->IncludeDirectoriesEntries);
   deleteAndClear(this->Pointer->CompileOptionsEntries);
   deleteAndClear(this->Pointer->CompileDefinitionsEntries);
-  deleteAndClear(this->Pointer->SourceEntries);
   delete this->Pointer;
 }
 
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index fcbff93..3ef853b 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -135,14 +135,17 @@ public:
   /**
    * Get the list of the source files used by this target
    */
-  void GetSourceFiles(std::vector<std::string> &files) const;
   void GetSourceFiles(std::vector<cmSourceFile*> &files) const;
+  void AddSourceFile(cmSourceFile* sf);
+  std::vector<std::string> const& GetObjectLibraries() const
+    {
+    return this->ObjectLibraries;
+    }
 
   /**
    * Add sources to the target.
    */
   void AddSources(std::vector<std::string> const& srcs);
-  cmSourceFile* AddSourceCMP0049(const std::string& src);
   cmSourceFile* AddSource(const std::string& src);
 
   enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};
@@ -682,6 +685,8 @@ private:
   std::vector<cmCustomCommand> PreLinkCommands;
   std::vector<cmCustomCommand> PostBuildCommands;
   TargetType TargetTypeValue;
+  std::vector<cmSourceFile*> SourceFiles;
+  std::vector<std::string> ObjectLibraries;
   LinkLibraryVectorType LinkLibraries;
   LinkLibraryVectorType PrevLinkedLibraries;
   bool LinkLibrariesAnalyzed;
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 8d10e7c..bb76b7f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1054,19 +1054,6 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
 
   std::vector<cmSourceFile const*> externalObjects;
   this->GeneratorTarget->GetExternalObjects(externalObjects);
-  for(std::vector<cmSourceFile const*>::iterator
-        si = externalObjects.begin();
-      si != externalObjects.end(); )
-    {
-    if (!(*si)->GetObjectLibrary().empty())
-      {
-      si = externalObjects.erase(si);
-      }
-    else
-      {
-      ++si;
-      }
-    }
   if(this->LocalGenerator->GetVersion() > cmLocalVisualStudioGenerator::VS10)
     {
     // For VS >= 11 we use LinkObjects to avoid linking custom command
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index b506853..a0e34ef 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -166,7 +166,7 @@ add_library(imported4 SHARED IMPORTED)
 set_property(TARGET imported4 APPEND PROPERTY
   INCLUDE_DIRECTORIES $<TARGET_PROPERTY:imported3,INTERFACE_INCLUDE_DIRECTORIES>)
 
-add_executable(someexe $<1:empty.cpp> $<0:does_not_exist>)
+add_executable(someexe empty.cpp)
 add_executable(Alias::SomeExe ALIAS someexe)
 
 add_library(Alias::SomeLib ALIAS empty1)
@@ -258,17 +258,3 @@ set(CMP0044_TYPE NEW)
 add_subdirectory(CMP0044 ${CMAKE_BINARY_DIR}/CMP0044-NEW)
 set(CMP0044_TYPE OLD)
 add_subdirectory(CMP0044 ${CMAKE_BINARY_DIR}/CMP0044-OLD)
-
-add_library(objlib OBJECT objlib1.c objlib2.c)
-file(GENERATE
-  OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/objlib_files"
-  CONTENT "$<JOIN:$<TARGET_OBJECTS:objlib>,\n>\n"
-)
-add_custom_target(check_object_files ALL
-  COMMAND ${CMAKE_COMMAND}
-    "-DOBJLIB_LISTFILE=${CMAKE_CURRENT_BINARY_DIR}/objlib_files"
-    -DTEST_CONFIGURATION=${CMAKE_BUILD_TYPE}
-    -DEXPECTED_NUM_OBJECTFILES=2
-    -P "${CMAKE_CURRENT_SOURCE_DIR}/check_object_files.cmake"
-  DEPENDS objlib
-)
diff --git a/Tests/GeneratorExpression/check_object_files.cmake b/Tests/GeneratorExpression/check_object_files.cmake
deleted file mode 100644
index 889fe80..0000000
--- a/Tests/GeneratorExpression/check_object_files.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-
-if (NOT EXISTS ${OBJLIB_LISTFILE})
-  message(SEND_ERROR "Object listing file \"${OBJLIB_LISTFILE}\" not found!")
-endif()
-
-file(STRINGS ${OBJLIB_LISTFILE} objlib_files)
-
-list(LENGTH objlib_files num_objectfiles)
-if (NOT EXPECTED_NUM_OBJECTFILES EQUAL num_objectfiles)
-  message(SEND_ERROR "Unexpected number of entries in object list file (${num_objectfiles} instead of ${EXPECTED_NUM_OBJECTFILES})")
-endif()
-
-foreach(objlib_file ${objlib_files})
-  set(file_exists False)
-  if (EXISTS ${objlib_file})
-    set(file_exists True)
-  endif()
-
-  if (NOT file_exists)
-    if (objlib_file MATCHES ".(CURRENT_ARCH)")
-      string(REPLACE "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" "*" config_file "${objlib_file}")
-      string(REPLACE "$(PROJECT_NAME)" "GeneratorExpression" config_file "${config_file}")
-      string(REPLACE "$(CURRENT_ARCH)" "*" config_file "${config_file}")
-      file(GLOB_RECURSE files "${config_file}")
-      list(LENGTH files num_files)
-      if (NOT files)
-        message(SEND_ERROR "Got no files for expression ${config_file}")
-      endif()
-      set(file_exists True)
-    else()
-      foreach(config_macro "$(Configuration)" "$(OutDir)" "$(IntDir)")
-        string(REPLACE "${config_macro}" "${TEST_CONFIGURATION}" config_file "${objlib_file}")
-        list(APPEND attempts ${config_file})
-        if (EXISTS ${config_file})
-          set(file_exists True)
-        endif()
-      endforeach()
-    endif()
-  endif()
-
-  if (NOT file_exists)
-    if(attempts)
-      list(REMOVE_DUPLICATES attempts)
-      set(tried "  Tried ${attempts}")
-    endif()
-    message(SEND_ERROR "File \"${objlib_file}\" does not exist!${tried}")
-  endif()
-endforeach()
diff --git a/Tests/GeneratorExpression/objlib1.c b/Tests/GeneratorExpression/objlib1.c
deleted file mode 100644
index aa8de0a..0000000
--- a/Tests/GeneratorExpression/objlib1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-
-void objlib1()
-{
-
-}
diff --git a/Tests/GeneratorExpression/objlib2.c b/Tests/GeneratorExpression/objlib2.c
deleted file mode 100644
index 3c7307a..0000000
--- a/Tests/GeneratorExpression/objlib2.c
+++ /dev/null
@@ -1,5 +0,0 @@
-
-void objlib2()
-{
-
-}
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index f557ded..f9d590a 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -50,7 +50,6 @@ add_RunCMake_test(TargetPropertyGeneratorExpressions)
 add_RunCMake_test(Languages)
 add_RunCMake_test(ObjectLibrary)
 add_RunCMake_test(find_dependency)
-add_RunCMake_test(TargetObjects)
 if(NOT WIN32)
   add_RunCMake_test(PositionIndependentCode)
   set(SKIP_VISIBILITY 0)
diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt
index 859dc3f..a1cac36 100644
--- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt
@@ -1,8 +1,6 @@
 CMake Error at BadSourceExpression1.cmake:1 \(add_library\):
-  Error evaluating generator expression:
+  Unrecognized generator expression:
 
     \$<BAD_EXPRESSION>
-
-  Expression did not evaluate to a known generator expression
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt
index 7060c61..f1fcbe8 100644
--- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt
@@ -1,8 +1,4 @@
 CMake Error at BadSourceExpression2.cmake:1 \(add_library\):
-  Error evaluating generator expression:
-
-    \$<TARGET_OBJECTS:DoesNotExist>
-
   Objects of target "DoesNotExist" referenced but no such target exists.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
index 838b3d8..ad14a35 100644
--- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
+++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt
@@ -1,8 +1,4 @@
 CMake Error at BadSourceExpression3.cmake:2 \(add_library\):
-  Error evaluating generator expression:
-
-    \$<TARGET_OBJECTS:NotObjLib>
-
   Objects of target "NotObjLib" referenced but is not an OBJECT library.
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/TargetObjects/CMakeLists.txt b/Tests/RunCMake/TargetObjects/CMakeLists.txt
deleted file mode 100644
index be9d403..0000000
--- a/Tests/RunCMake/TargetObjects/CMakeLists.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 2.8.4)
-project(${RunCMake_TEST})
-include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/TargetObjects/NoTarget-result.txt b/Tests/RunCMake/TargetObjects/NoTarget-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/TargetObjects/NoTarget-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/TargetObjects/NoTarget-stderr.txt b/Tests/RunCMake/TargetObjects/NoTarget-stderr.txt
deleted file mode 100644
index 2c4f877..0000000
--- a/Tests/RunCMake/TargetObjects/NoTarget-stderr.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CMake Error at NoTarget.cmake:2 \(file\):
-  Error evaluating generator expression:
-
-    \$<TARGET_OBJECTS:NoTarget>
-
-  Objects of target "NoTarget" referenced but no such target exists.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/TargetObjects/NoTarget.cmake b/Tests/RunCMake/TargetObjects/NoTarget.cmake
deleted file mode 100644
index f203c23..0000000
--- a/Tests/RunCMake/TargetObjects/NoTarget.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-
-file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:NoTarget>)
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget-result.txt b/Tests/RunCMake/TargetObjects/NotObjlibTarget-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt b/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
deleted file mode 100644
index bb83934..0000000
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-CMake Error at NotObjlibTarget.cmake:4 \(file\):
-  Error evaluating generator expression:
-
-    \$<TARGET_OBJECTS:StaticLib>
-
-  Objects of target "StaticLib" referenced but is not an OBJECT library.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
deleted file mode 100644
index c7f8a71..0000000
--- a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-add_library(StaticLib empty.cpp)
-
-file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:StaticLib>)
diff --git a/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake b/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
deleted file mode 100644
index 30b9fee..0000000
--- a/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-include(RunCMake)
-
-run_cmake(NoTarget)
-run_cmake(NotObjlibTarget)
diff --git a/Tests/RunCMake/TargetObjects/empty.cpp b/Tests/RunCMake/TargetObjects/empty.cpp
deleted file mode 100644
index bfbbdde..0000000
--- a/Tests/RunCMake/TargetObjects/empty.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
-int empty()
-{
-  return 0;
-}
diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt
index be6d8fe..00383ab 100644
--- a/Tests/StringFileTest/CMakeLists.txt
+++ b/Tests/StringFileTest/CMakeLists.txt
@@ -286,9 +286,3 @@ string(MAKE_C_IDENTIFIER "1one-two$" MCI_1)
 if(NOT MCI_1 STREQUAL _1one_two_)
   message(SEND_ERROR "MAKE_C_IDENTIFIER did not create expected result.")
 endif()
-
-string(GENEX_STRIP "one;$<1:two;three>;four;$<TARGET_OBJECTS:some_target>" strip_result)
-
-if (NOT strip_result STREQUAL "one;four")
-  message(SEND_ERROR "GENEX_STRIP did not create expected result: ${strip_result}")
-endif()

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

Summary of changes:
 Help/command/add_executable.rst                    |    7 +-
 Help/command/add_library.rst                       |    6 +-
 Help/command/string.rst                            |    5 -
 Help/manual/cmake-generator-expressions.7.rst      |    3 -
 Help/manual/cmake-policies.7.rst                   |    1 -
 Help/policy/CMP0051.rst                            |   24 --
 Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst  |    6 -
 Help/release/dev/string-GENEX_STRIP.rst            |    6 -
 Help/release/dev/target-SOURCES-genex.rst          |   12 -
 Source/cmComputeTargetDepends.cxx                  |   29 --
 Source/cmFLTKWrapUICommand.cxx                     |    2 +-
 Source/cmGeneratorExpressionEvaluator.cxx          |   64 ----
 Source/cmGeneratorTarget.cxx                       |  128 ++++----
 Source/cmGeneratorTarget.h                         |    8 +-
 Source/cmGlobalGenerator.cxx                       |   56 +++-
 Source/cmGlobalGenerator.h                         |    4 +-
 Source/cmGlobalVisualStudio8Generator.cxx          |    3 +-
 Source/cmGlobalXCodeGenerator.cxx                  |   18 +-
 Source/cmLocalGenerator.cxx                        |    4 +-
 Source/cmLocalVisualStudio6Generator.cxx           |    4 +-
 Source/cmLocalVisualStudio7Generator.cxx           |    4 +-
 Source/cmMakefile.cxx                              |    4 +-
 Source/cmMakefileTargetGenerator.cxx               |    3 +
 Source/cmNinjaTargetGenerator.cxx                  |   11 +
 Source/cmPolicies.cxx                              |    5 -
 Source/cmPolicies.h                                |    1 -
 Source/cmQtAutoGenerators.cxx                      |   17 +-
 Source/cmSourceFile.cxx                            |   12 -
 Source/cmSourceFile.h                              |    4 -
 Source/cmSourceFileLocation.cxx                    |   41 ---
 Source/cmSourceFileLocation.h                      |    3 -
 Source/cmStringCommand.cxx                         |   25 --
 Source/cmStringCommand.h                           |    1 -
 Source/cmTarget.cxx                                |  312 ++++----------------
 Source/cmTarget.h                                  |    9 +-
 Source/cmVisualStudio10TargetGenerator.cxx         |   13 -
 Tests/GeneratorExpression/CMakeLists.txt           |   16 +-
 Tests/GeneratorExpression/check_object_files.cmake |   48 ---
 Tests/GeneratorExpression/objlib1.c                |    5 -
 Tests/GeneratorExpression/objlib2.c                |    5 -
 Tests/RunCMake/CMakeLists.txt                      |    1 -
 .../ObjectLibrary/BadSourceExpression1-stderr.txt  |    4 +-
 .../ObjectLibrary/BadSourceExpression2-stderr.txt  |    4 -
 .../ObjectLibrary/BadSourceExpression3-stderr.txt  |    4 -
 Tests/RunCMake/TargetObjects/CMakeLists.txt        |    3 -
 Tests/RunCMake/TargetObjects/NoTarget-result.txt   |    1 -
 Tests/RunCMake/TargetObjects/NoTarget-stderr.txt   |    8 -
 Tests/RunCMake/TargetObjects/NoTarget.cmake        |    2 -
 .../TargetObjects/NotObjlibTarget-result.txt       |    1 -
 .../TargetObjects/NotObjlibTarget-stderr.txt       |    8 -
 Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake |    4 -
 Tests/RunCMake/TargetObjects/RunCMakeTest.cmake    |    4 -
 Tests/RunCMake/TargetObjects/empty.cpp             |    7 -
 Tests/StringFileTest/CMakeLists.txt                |    6 -
 54 files changed, 243 insertions(+), 743 deletions(-)
 delete mode 100644 Help/policy/CMP0051.rst
 delete mode 100644 Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst
 delete mode 100644 Help/release/dev/string-GENEX_STRIP.rst
 delete mode 100644 Help/release/dev/target-SOURCES-genex.rst
 delete mode 100644 Tests/GeneratorExpression/check_object_files.cmake
 delete mode 100644 Tests/GeneratorExpression/objlib1.c
 delete mode 100644 Tests/GeneratorExpression/objlib2.c
 delete mode 100644 Tests/RunCMake/TargetObjects/CMakeLists.txt
 delete mode 100644 Tests/RunCMake/TargetObjects/NoTarget-result.txt
 delete mode 100644 Tests/RunCMake/TargetObjects/NoTarget-stderr.txt
 delete mode 100644 Tests/RunCMake/TargetObjects/NoTarget.cmake
 delete mode 100644 Tests/RunCMake/TargetObjects/NotObjlibTarget-result.txt
 delete mode 100644 Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt
 delete mode 100644 Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake
 delete mode 100644 Tests/RunCMake/TargetObjects/RunCMakeTest.cmake
 delete mode 100644 Tests/RunCMake/TargetObjects/empty.cpp


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list