[Cmake-commits] CMake branch, next, updated. v3.3.0-2098-g67df5c9

Stephen Kelly steveire at gmail.com
Fri Aug 7 15:55:06 EDT 2015


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  67df5c9aeee85453af8e53562b97f21dd4a40c55 (commit)
       via  6e13042cec7ca40cdb1a52ae92ccb6693bcba53b (commit)
      from  f08cc08dc647b09d2b5d6e0f681bd551c957db97 (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=67df5c9aeee85453af8e53562b97f21dd4a40c55
commit 67df5c9aeee85453af8e53562b97f21dd4a40c55
Merge: f08cc08 6e13042
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Aug 7 15:55:05 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Aug 7 15:55:05 2015 -0400

    Merge topic 'use-generator-target' into next
    
    6e13042c Revert "cmTarget: Split storage of sources from genexes."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e13042cec7ca40cdb1a52ae92ccb6693bcba53b
commit 6e13042cec7ca40cdb1a52ae92ccb6693bcba53b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Aug 7 21:54:31 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Aug 7 21:54:31 2015 +0200

    Revert "cmTarget: Split storage of sources from genexes."
    
    This reverts commit 3bbd5425d31e179dbb1b70d944ac24523b0eb46b.

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b094125..ce806ba 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -313,9 +313,7 @@ bool cmQtAutoGenerators::InitializeAutogenTarget(cmLocalGenerator* lg,
     makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
                             mocCppFile.c_str(), false);
 
-    std::vector<std::string> mocCppFiles;
-    mocCppFiles.push_back(mocCppFile);
-    target->AddTracedSources(mocCppFiles);
+    target->AddSource(mocCppFile);
     }
   // create a custom target for running generators at buildtime:
   std::string autogenTargetName = getAutogenTargetName(target);
@@ -739,7 +737,12 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
       }
     }
 
-  const_cast<cmTarget*>(target)->AddTracedSources(newRccFiles);
+  for(std::vector<std::string>::const_iterator fileIt = newRccFiles.begin();
+      fileIt != newRccFiles.end();
+      ++fileIt)
+    {
+    const_cast<cmTarget*>(target)->AddSource(*fileIt);
+    }
 }
 
 void cmQtAutoGenerators::SetupAutoMocTarget(cmTarget const* target,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f1a05ff..d3170e4 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -180,9 +180,7 @@ public:
   std::vector<std::string> CompileDefinitionsEntries;
   std::vector<cmListFileBacktrace> CompileDefinitionsBacktraces;
   std::vector<TargetPropertyEntry*> CompileDefinitionsItems;
-  std::vector<std::string> SourceEntries;
-  std::vector<cmListFileBacktrace> SourceBacktraces;
-  std::vector<TargetPropertyEntry*> SourceItems;
+  std::vector<TargetPropertyEntry*> SourceEntries;
   std::vector<cmValueWithOrigin> LinkImplementationPropertyEntries;
 
   void AddInterfaceEntries(
@@ -442,8 +440,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
 void CreatePropertyGeneratorExpressions(
     std::vector<std::string> const& entries,
     std::vector<cmListFileBacktrace> const& backtraces,
-    std::vector<cmTargetInternals::TargetPropertyEntry*>& items,
-    bool evaluateForBuildsystem = false)
+    std::vector<cmTargetInternals::TargetPropertyEntry*>& items)
 {
   std::vector<cmListFileBacktrace>::const_iterator btIt = backtraces.begin();
   for (std::vector<std::string>::const_iterator it = entries.begin();
@@ -451,7 +448,6 @@ void CreatePropertyGeneratorExpressions(
     {
     cmGeneratorExpression ge(*btIt);
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*it);
-    cge->SetEvaluateForBuildsystem(evaluateForBuildsystem);
     items.push_back(new cmTargetInternals::TargetPropertyEntry(cge));
     }
 }
@@ -477,11 +473,6 @@ void cmTarget::Compute()
         this->Internal->CompileDefinitionsEntries,
         this->Internal->CompileDefinitionsBacktraces,
         this->Internal->CompileDefinitionsItems);
-
-  CreatePropertyGeneratorExpressions(
-        this->Internal->SourceEntries,
-        this->Internal->SourceBacktraces,
-        this->Internal->SourceItems, true);
 }
 
 //----------------------------------------------------------------------------
@@ -734,11 +725,13 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
     // for TARGET_OBJECTS instead for backwards compatibility with OLD
     // behavior of CMP0024 and CMP0026 only.
 
-    for(std::vector<std::string>::const_iterator
+    typedef cmTargetInternals::TargetPropertyEntry
+                                TargetPropertyEntry;
+    for(std::vector<TargetPropertyEntry*>::const_iterator
           i = this->Internal->SourceEntries.begin();
         i != this->Internal->SourceEntries.end(); ++i)
       {
-      std::string const& entry = *i;
+      std::string entry = (*i)->ge->GetInput();
 
       std::vector<std::string> items;
       cmSystemTools::ExpandListArgument(entry, items);
@@ -780,7 +773,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
 
   UNORDERED_SET<std::string> uniqueSrcs;
   bool contextDependentDirectSources = processSources(this,
-                 this->Internal->SourceItems,
+                 this->Internal->SourceEntries,
                  files,
                  uniqueSrcs,
                  &dagChecker,
@@ -917,12 +910,11 @@ void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
     this->Internal->SourceFilesMap.clear();
     this->LinkImplementationLanguageIsContextDependent = true;
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->SourceEntries.push_back(srcFiles);
-    this->Internal->SourceBacktraces.push_back(lfbt);
     cmGeneratorExpression ge(lfbt);
     cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles);
-    this->Internal->SourceItems.push_back(
-          new cmTargetInternals::TargetPropertyEntry(cge));
+    cge->SetEvaluateForBuildsystem(true);
+    this->Internal->SourceEntries.push_back(
+                          new cmTargetInternals::TargetPropertyEntry(cge));
     }
 }
 
@@ -958,8 +950,11 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs)
     this->Internal->SourceFilesMap.clear();
     this->LinkImplementationLanguageIsContextDependent = true;
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->SourceEntries.push_back(srcFiles);
-    this->Internal->SourceBacktraces.push_back(lfbt);
+    cmGeneratorExpression ge(lfbt);
+    cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles);
+    cge->SetEvaluateForBuildsystem(true);
+    this->Internal->SourceEntries.push_back(
+                          new cmTargetInternals::TargetPropertyEntry(cge));
     }
 }
 
@@ -1063,10 +1058,10 @@ public:
 
   }
 
-  bool operator()(std::string const& entry)
+  bool operator()(cmTargetInternals::TargetPropertyEntry* entry)
   {
     std::vector<std::string> files;
-    cmSystemTools::ExpandListArgument(entry, 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()));
@@ -1088,8 +1083,11 @@ cmSourceFile* cmTarget::AddSource(const std::string& src)
     this->Internal->SourceFilesMap.clear();
     this->LinkImplementationLanguageIsContextDependent = true;
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-    this->Internal->SourceEntries.push_back(src);
-    this->Internal->SourceBacktraces.push_back(lfbt);
+    cmGeneratorExpression ge(lfbt);
+    cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(src);
+    cge->SetEvaluateForBuildsystem(true);
+    this->Internal->SourceEntries.push_back(
+                          new cmTargetInternals::TargetPropertyEntry(cge));
     }
   if (cmGeneratorExpression::Find(src) != std::string::npos)
     {
@@ -1764,11 +1762,11 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
       }
     this->Internal->SourceFilesMap.clear();
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-
+    cmGeneratorExpression ge(lfbt);
     this->Internal->SourceEntries.clear();
-    this->Internal->SourceBacktraces.clear();
-    this->Internal->SourceEntries.push_back(value);
-    this->Internal->SourceBacktraces.push_back(lfbt);
+    cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
+    this->Internal->SourceEntries.push_back(
+                          new cmTargetInternals::TargetPropertyEntry(cge));
     }
   else
     {
@@ -1849,8 +1847,10 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
       }
       this->Internal->SourceFilesMap.clear();
       cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
-      this->Internal->SourceEntries.push_back(value);
-      this->Internal->SourceBacktraces.push_back(lfbt);
+      cmGeneratorExpression ge(lfbt);
+      cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
+      this->Internal->SourceEntries.push_back(
+                            new cmTargetInternals::TargetPropertyEntry(cge));
     }
   else
     {
@@ -2975,11 +2975,13 @@ const char *cmTarget::GetProperty(const std::string& prop,
 
       std::ostringstream ss;
       const char* sep = "";
-      for(std::vector<std::string>::const_iterator
+      typedef cmTargetInternals::TargetPropertyEntry
+                                  TargetPropertyEntry;
+      for(std::vector<TargetPropertyEntry*>::const_iterator
             i = this->Internal->SourceEntries.begin();
           i != this->Internal->SourceEntries.end(); ++i)
         {
-        std::string const& entry = *i;
+        std::string entry = (*i)->ge->GetInput();
 
         std::vector<std::string> files;
         cmSystemTools::ExpandListArgument(entry, files);
@@ -3679,11 +3681,13 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const
   // 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.
-  for(std::vector<std::string>::const_iterator
+  typedef cmTargetInternals::TargetPropertyEntry
+                              TargetPropertyEntry;
+  for(std::vector<TargetPropertyEntry*>::const_iterator
         i = this->Internal->SourceEntries.begin();
       i != this->Internal->SourceEntries.end(); ++i)
     {
-    std::string const& entry = *i;
+    std::string entry = (*i)->ge->GetInput();
 
     std::vector<std::string> files;
     cmSystemTools::ExpandListArgument(entry, files);
@@ -4820,7 +4824,7 @@ cmTargetInternalPointer::~cmTargetInternalPointer()
   cmDeleteAll(this->Pointer->CompileOptionsItems);
   cmDeleteAll(this->Pointer->CompileFeaturesItems);
   cmDeleteAll(this->Pointer->CompileDefinitionsItems);
-  cmDeleteAll(this->Pointer->SourceItems);
+  cmDeleteAll(this->Pointer->SourceEntries);
   delete this->Pointer;
 }
 

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

Summary of changes:
 Source/cmQtAutoGenerators.cxx |   11 +++---
 Source/cmTarget.cxx           |   74 ++++++++++++++++++++++-------------------
 2 files changed, 46 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list