[Cmake-commits] CMake branch, next, updated. v3.0.0-4396-gfe74f3b

Brad King brad.king at kitware.com
Mon Jul 21 10:57:19 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  fe74f3b9dc321a3340b9e96646a193469d0be653 (commit)
       via  c3de083ee5cab903b2925908e9a330a9b27e2ffd (commit)
       via  e5821c20de537662b62d91d276499dd797963d6e (commit)
       via  bbea91c7b37bbe41db19c8cadf554af0fd55e4e9 (commit)
      from  8187de1946953a26308be5b3054fb0ec5ca59766 (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=fe74f3b9dc321a3340b9e96646a193469d0be653
commit fe74f3b9dc321a3340b9e96646a193469d0be653
Merge: 8187de1 c3de083
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 21 10:57:18 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 21 10:57:18 2014 -0400

    Merge topic 'target-drop-build-setting-cache' into next
    
    c3de083e genex-head-sensitive-conditions
    e5821c20 cmTarget: Drop internal cache of build properties
    bbea91c7 cmTarget: Drop internal cache of link interface usage requirements


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3de083ee5cab903b2925908e9a330a9b27e2ffd
commit c3de083ee5cab903b2925908e9a330a9b27e2ffd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 18 15:36:23 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 18 15:36:23 2014 -0400

    genex-head-sensitive-conditions

diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 2b4d955..7fc1464 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -97,6 +97,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
   context.Quiet = quiet;
   context.HadError = false;
   context.HadContextSensitiveCondition = false;
+  context.HadHeadSensitiveCondition = false;
   context.HeadTarget = headTarget;
   context.EvaluateForBuildsystem = this->EvaluateForBuildsystem;
   context.CurrentTarget = currentTarget ? currentTarget : headTarget;
@@ -124,6 +125,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
   if (!context.HadError)
     {
     this->HadContextSensitiveCondition = context.HadContextSensitiveCondition;
+    this->HadHeadSensitiveCondition = context.HadHeadSensitiveCondition;
     }
 
   this->DependTargets = context.DependTargets;
@@ -137,6 +139,7 @@ cmCompiledGeneratorExpression::cmCompiledGeneratorExpression(
               const std::string& input)
   : Backtrace(backtrace), Input(input),
     HadContextSensitiveCondition(false),
+    HadHeadSensitiveCondition(false),
     EvaluateForBuildsystem(false)
 {
   cmGeneratorExpressionLexer l;
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 324d23c..b952520 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -111,6 +111,10 @@ public:
   {
     return this->HadContextSensitiveCondition;
   }
+  bool GetHadHeadSensitiveCondition() const
+  {
+    return this->HadHeadSensitiveCondition;
+  }
 
   void SetEvaluateForBuildsystem(bool eval)
   {
@@ -141,6 +145,7 @@ private:
                                                           MaxLanguageStandard;
   mutable std::string Output;
   mutable bool HadContextSensitiveCondition;
+  mutable bool HadHeadSensitiveCondition;
   bool EvaluateForBuildsystem;
 };
 
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 28879f1..3d03ece 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -840,6 +840,10 @@ getLinkedTargetsContent(
       {
       context->HadContextSensitiveCondition = true;
       }
+    if (cge->GetHadHeadSensitiveCondition())
+      {
+      context->HadHeadSensitiveCondition = true;
+      }
     }
   linkedTargetsContent =
     cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
@@ -871,6 +875,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
     cmTarget const* target = context->HeadTarget;
     std::string propertyName = *parameters.begin();
 
+    if (parameters.size() == 1)
+      {
+      context->HadHeadSensitiveCondition = true;
+      }
     if (!target && parameters.size() == 1)
       {
       reportError(context, content->GetOriginalExpression(),
@@ -1313,6 +1321,7 @@ static const struct CompileFeaturesNode : public cmGeneratorExpressionNode
           "not be used with add_custom_command or add_custom_target.");
       return std::string();
       }
+    context->HadHeadSensitiveCondition = true;
 
     typedef std::map<std::string, std::vector<std::string> > LangMap;
     static LangMap availableFeatures;
@@ -1446,6 +1455,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
       }
 
     context->HadContextSensitiveCondition = true;
+    context->HadHeadSensitiveCondition = true;
 
     for (size_t i = 1; i < cmArraySize(targetPolicyWhitelist); ++i)
       {
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index 0ffb860..8a529e8 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -41,6 +41,7 @@ struct cmGeneratorExpressionContext
   bool Quiet;
   bool HadError;
   bool HadContextSensitiveCondition;
+  bool HadHeadSensitiveCondition;
   bool EvaluateForBuildsystem;
 };
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5821c20de537662b62d91d276499dd797963d6e
commit e5821c20de537662b62d91d276499dd797963d6e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 18 14:04:56 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 18 15:12:18 2014 -0400

    cmTarget: Drop internal cache of build properties
    
    These use a huge amount of memory that accumulates as generation
    proceeds.  On the Unix Makefiles generator, only GetIncludeDirectories
    and GetCompileDefinitions are even called more than once per target
    (once for build files, once for dependency scanning preprocessor info).
    Another approach will be needed to avoid duplicate computation in the
    cases where it does occur.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a812df7..9d00591 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -196,11 +196,9 @@ public:
   public:
     TargetPropertyEntry(cmsys::auto_ptr<cmCompiledGeneratorExpression> cge,
                         cmLinkImplItem const& item = NoLinkImplItem)
-      : ge(cge), Cached(false), LinkImplItem(item)
+      : ge(cge), LinkImplItem(item)
     {}
     const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge;
-    std::vector<std::string> CachedEntries;
-    bool Cached;
     cmLinkImplItem const& LinkImplItem;
   };
   std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
@@ -635,49 +633,37 @@ static bool processSources(cmTarget const* tgt,
   for (std::vector<cmTargetInternals::TargetPropertyEntry*>::const_iterator
       it = entries.begin(), end = entries.end(); it != end; ++it)
     {
-    bool cacheSources = false;
-    std::vector<std::string> entrySources = (*it)->CachedEntries;
-    if(entrySources.empty())
+    std::vector<std::string> entrySources;
+    cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+                                              config,
+                                              false,
+                                              tgt,
+                                              tgt,
+                                              dagChecker),
+                                    entrySources);
+
+    if ((*it)->ge->GetHadContextSensitiveCondition())
       {
-      cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
-                                                config,
-                                                false,
-                                                tgt,
-                                                tgt,
-                                                dagChecker),
-                                      entrySources);
+      contextDependent = true;
+      }
 
-      if ((*it)->ge->GetHadContextSensitiveCondition())
-        {
-        contextDependent = true;
-        }
-      else if (mf->IsGeneratingBuildSystem())
-        {
-        cacheSources = true;
-        }
+    for(std::vector<std::string>::iterator i = entrySources.begin();
+        i != entrySources.end(); ++i)
+      {
+      std::string& src = *i;
 
-      for(std::vector<std::string>::iterator i = entrySources.begin();
-          i != entrySources.end(); ++i)
+      cmSourceFile* sf = mf->GetOrCreateSource(src);
+      std::string e;
+      src = sf->GetFullPath(&e);
+      if(src.empty())
         {
-        std::string& src = *i;
-
-        cmSourceFile* sf = mf->GetOrCreateSource(src);
-        std::string e;
-        src = sf->GetFullPath(&e);
-        if(src.empty())
+        if(!e.empty())
           {
-          if(!e.empty())
-            {
-            cmake* cm = mf->GetCMakeInstance();
-            cm->IssueMessage(cmake::FATAL_ERROR, e,
-                            tgt->GetBacktrace());
-            }
-          return contextDependent;
+          cmake* cm = mf->GetCMakeInstance();
+          cm->IssueMessage(cmake::FATAL_ERROR, e,
+                          tgt->GetBacktrace());
           }
-        }
-      if (cacheSources)
-        {
-        (*it)->CachedEntries = entrySources;
+        return contextDependent;
         }
       }
     std::string usedSources;
@@ -2003,27 +1989,14 @@ static void processIncludeDirectories(cmTarget const* tgt,
     std::string const& targetName = item;
     bool const fromImported = item.Target && item.Target->IsImported();
     bool const checkCMP0027 = item.FromGenex;
-    bool testIsOff = true;
-    bool cacheIncludes = false;
-    std::vector<std::string>& entryIncludes = (*it)->CachedEntries;
-    if(!entryIncludes.empty())
-      {
-      testIsOff = false;
-      }
-    else
-      {
-      cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
-                                                config,
-                                                false,
-                                                tgt,
-                                                dagChecker),
-                                      entryIncludes);
-      if (mf->IsGeneratingBuildSystem()
-          && !(*it)->ge->GetHadContextSensitiveCondition())
-        {
-        cacheIncludes = true;
-        }
-      }
+    std::vector<std::string> entryIncludes;
+    cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+                                              config,
+                                              false,
+                                              tgt,
+                                              dagChecker),
+                                    entryIncludes);
+
     std::string usedIncludes;
     for(std::vector<std::string>::iterator
           li = entryIncludes.begin(); li != entryIncludes.end(); ++li)
@@ -2105,7 +2078,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
           }
         }
 
-      if (testIsOff && !cmSystemTools::IsOff(li->c_str()))
+      if (!cmSystemTools::IsOff(li->c_str()))
         {
         cmSystemTools::ConvertToUnixSlashes(*li);
         }
@@ -2120,10 +2093,6 @@ static void processIncludeDirectories(cmTarget const* tgt,
           }
         }
       }
-    if (cacheIncludes)
-      {
-      (*it)->CachedEntries = entryIncludes;
-      }
     if (!usedIncludes.empty())
       {
       mf->GetCMakeInstance()->IssueMessage(cmake::LOG,
@@ -2229,33 +2198,16 @@ static void processCompileOptionsInternal(cmTarget const* tgt,
   for (std::vector<cmTargetInternals::TargetPropertyEntry*>::const_iterator
       it = entries.begin(), end = entries.end(); it != end; ++it)
     {
-    std::vector<std::string>& entriesRef = (*it)->CachedEntries;
-    std::vector<std::string> localEntries;
-    std::vector<std::string>* entryOptions = &entriesRef;
-    if(!(*it)->Cached)
-      {
-      cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
-                                                config,
-                                                false,
-                                                tgt,
-                                                dagChecker),
-                                      localEntries);
-      if (mf->IsGeneratingBuildSystem()
-          && !(*it)->ge->GetHadContextSensitiveCondition())
-        {
-        // Cache the result.
-        *entryOptions = localEntries;
-        (*it)->Cached = true;
-        }
-      else
-        {
-        // Use the context-sensitive results here.
-        entryOptions = &localEntries;
-        }
-      }
+    std::vector<std::string> entryOptions;
+    cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+                                              config,
+                                              false,
+                                              tgt,
+                                              dagChecker),
+                                    entryOptions);
     std::string usedOptions;
     for(std::vector<std::string>::iterator
-          li = entryOptions->begin(); li != entryOptions->end(); ++li)
+          li = entryOptions.begin(); li != entryOptions.end(); ++li)
       {
       std::string const& opt = *li;
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bbea91c7b37bbe41db19c8cadf554af0fd55e4e9
commit bbea91c7b37bbe41db19c8cadf554af0fd55e4e9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 18 13:57:57 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 18 15:07:07 2014 -0400

    cmTarget: Drop internal cache of link interface usage requirements
    
    These use a huge amount of memory that accumulates as generation
    proceeds.  On the Unix Makefiles generator, only GetIncludeDirectories
    and GetCompileDefinitions are even called more than once per target
    (once for build files, once for dependency scanning preprocessor info).
    Another approach will be needed to avoid duplicate computation in the
    cases where it does occur.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 07f08de..a812df7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -213,23 +213,6 @@ public:
   void AddInterfaceEntries(
     cmTarget const* thisTarget, std::string const& config,
     std::string const& prop, std::vector<TargetPropertyEntry*>& entries);
-
-  std::map<std::string, std::vector<TargetPropertyEntry*> >
-                        CachedLinkInterfaceIncludeDirectoriesEntries;
-  std::map<std::string, std::vector<TargetPropertyEntry*> >
-                        CachedLinkInterfaceCompileOptionsEntries;
-  std::map<std::string, std::vector<TargetPropertyEntry*> >
-                        CachedLinkInterfaceCompileDefinitionsEntries;
-  std::map<std::string, std::vector<TargetPropertyEntry*> >
-                        CachedLinkInterfaceSourcesEntries;
-  std::map<std::string, std::vector<TargetPropertyEntry*> >
-                        CachedLinkInterfaceCompileFeaturesEntries;
-
-  std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone;
-  std::map<std::string, bool> CacheLinkInterfaceCompileDefinitionsDone;
-  std::map<std::string, bool> CacheLinkInterfaceCompileOptionsDone;
-  std::map<std::string, bool> CacheLinkInterfaceSourcesDone;
-  std::map<std::string, bool> CacheLinkInterfaceCompileFeaturesDone;
 };
 
 cmLinkImplItem cmTargetInternals::TargetPropertyEntry::NoLinkImplItem;
@@ -249,26 +232,8 @@ static void deleteAndClear(
 }
 
 //----------------------------------------------------------------------------
-static void deleteAndClear(
-  std::map<std::string,
-          std::vector<cmTargetInternals::TargetPropertyEntry*> > &entries)
-{
-  for (std::map<std::string,
-          std::vector<cmTargetInternals::TargetPropertyEntry*> >::iterator
-        it = entries.begin(), end = entries.end(); it != end; ++it)
-    {
-    deleteAndClear(it->second);
-    }
-}
-
-//----------------------------------------------------------------------------
 cmTargetInternals::~cmTargetInternals()
 {
-  deleteAndClear(this->CachedLinkInterfaceIncludeDirectoriesEntries);
-  deleteAndClear(this->CachedLinkInterfaceCompileOptionsEntries);
-  deleteAndClear(this->CachedLinkInterfaceCompileFeaturesEntries);
-  deleteAndClear(this->CachedLinkInterfaceCompileDefinitionsEntries);
-  deleteAndClear(this->CachedLinkInterfaceSourcesEntries);
 }
 
 //----------------------------------------------------------------------------
@@ -810,16 +775,16 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
                  config,
                  debugSources);
 
-  if (!this->Internal->CacheLinkInterfaceSourcesDone[config])
-    {
-    this->Internal->AddInterfaceEntries(
-      this, config, "INTERFACE_SOURCES",
-      this->Internal->CachedLinkInterfaceSourcesEntries[config]);
-    }
+  std::vector<cmTargetInternals::TargetPropertyEntry*>
+    linkInterfaceSourcesEntries;
 
-    std::vector<std::string>::size_type numFilesBefore = files.size();
-    bool contextDependentInterfaceSources = processSources(this,
-    this->Internal->CachedLinkInterfaceSourcesEntries[config],
+  this->Internal->AddInterfaceEntries(
+    this, config, "INTERFACE_SOURCES",
+    linkInterfaceSourcesEntries);
+
+  std::vector<std::string>::size_type numFilesBefore = files.size();
+  bool contextDependentInterfaceSources = processSources(this,
+    linkInterfaceSourcesEntries,
                             files,
                             uniqueSrcs,
                             &dagChecker,
@@ -832,14 +797,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
     this->LinkImplementationLanguageIsContextDependent = false;
     }
 
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(this->Internal->CachedLinkInterfaceSourcesEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceSourcesDone[config] = true;
-    }
+  deleteAndClear(linkInterfaceSourcesEntries);
 }
 
 //----------------------------------------------------------------------------
@@ -2213,58 +2171,47 @@ cmTarget::GetIncludeDirectories(const std::string& config) const
                             config,
                             debugIncludes);
 
-  if (!this->Internal->CacheLinkInterfaceIncludeDirectoriesDone[config])
-    {
-    this->Internal->AddInterfaceEntries(
-      this, config, "INTERFACE_INCLUDE_DIRECTORIES",
-      this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[config]);
+  std::vector<cmTargetInternals::TargetPropertyEntry*>
+    linkInterfaceIncludeDirectoriesEntries;
+  this->Internal->AddInterfaceEntries(
+    this, config, "INTERFACE_INCLUDE_DIRECTORIES",
+    linkInterfaceIncludeDirectoriesEntries);
 
-    if(this->Makefile->IsOn("APPLE"))
+  if(this->Makefile->IsOn("APPLE"))
+    {
+    LinkImplementation const* impl = this->GetLinkImplementation(config);
+    for(std::vector<cmLinkImplItem>::const_iterator
+        it = impl->Libraries.begin();
+        it != impl->Libraries.end(); ++it)
       {
-      LinkImplementation const* impl = this->GetLinkImplementation(config);
-      for(std::vector<cmLinkImplItem>::const_iterator
-          it = impl->Libraries.begin();
-          it != impl->Libraries.end(); ++it)
-        {
-        std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
+      std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
 
-        static cmsys::RegularExpression
-          frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
-        if(!frameworkCheck.find(libDir))
-          {
-          continue;
-          }
+      static cmsys::RegularExpression
+        frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
+      if(!frameworkCheck.find(libDir))
+        {
+        continue;
+        }
 
-        libDir = frameworkCheck.match(1);
+      libDir = frameworkCheck.match(1);
 
-        cmGeneratorExpression ge;
-        cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
-                  ge.Parse(libDir.c_str());
-        this->Internal
-                ->CachedLinkInterfaceIncludeDirectoriesEntries[config]
-                .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
-        }
+      cmGeneratorExpression ge;
+      cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+                ge.Parse(libDir.c_str());
+      linkInterfaceIncludeDirectoriesEntries
+              .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
       }
     }
 
   processIncludeDirectories(this,
-    this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[config],
+                            linkInterfaceIncludeDirectoriesEntries,
                             includes,
                             uniqueIncludes,
                             &dagChecker,
                             config,
                             debugIncludes);
 
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(
-                this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceIncludeDirectoriesDone[config]
-                                                                      = true;
-    }
+  deleteAndClear(linkInterfaceIncludeDirectoriesEntries);
 
   return includes;
 }
@@ -2405,29 +2352,22 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
                             config,
                             debugOptions);
 
-  if (!this->Internal->CacheLinkInterfaceCompileOptionsDone[config])
-    {
-    this->Internal->AddInterfaceEntries(
-      this, config, "INTERFACE_COMPILE_OPTIONS",
-      this->Internal->CachedLinkInterfaceCompileOptionsEntries[config]);
-    }
+  std::vector<cmTargetInternals::TargetPropertyEntry*>
+    linkInterfaceCompileOptionsEntries;
+
+  this->Internal->AddInterfaceEntries(
+    this, config, "INTERFACE_COMPILE_OPTIONS",
+    linkInterfaceCompileOptionsEntries);
 
   processCompileOptions(this,
-    this->Internal->CachedLinkInterfaceCompileOptionsEntries[config],
+                        linkInterfaceCompileOptionsEntries,
                             result,
                             uniqueOptions,
                             &dagChecker,
                             config,
                             debugOptions);
 
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(this->Internal->CachedLinkInterfaceCompileOptionsEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceCompileOptionsDone[config] = true;
-    }
+  deleteAndClear(linkInterfaceCompileOptionsEntries);
 }
 
 //----------------------------------------------------------------------------
@@ -2479,66 +2419,54 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
                             config,
                             debugDefines);
 
-  if (!this->Internal->CacheLinkInterfaceCompileDefinitionsDone[config])
+  std::vector<cmTargetInternals::TargetPropertyEntry*>
+    linkInterfaceCompileDefinitionsEntries;
+  this->Internal->AddInterfaceEntries(
+    this, config, "INTERFACE_COMPILE_DEFINITIONS",
+    linkInterfaceCompileDefinitionsEntries);
+  if (!config.empty())
     {
-    this->Internal->AddInterfaceEntries(
-      this, config, "INTERFACE_COMPILE_DEFINITIONS",
-      this->Internal->CachedLinkInterfaceCompileDefinitionsEntries[config]);
-    if (!config.empty())
+    std::string configPropName = "COMPILE_DEFINITIONS_"
+                                        + cmSystemTools::UpperCase(config);
+    const char *configProp = this->GetProperty(configPropName);
+    if (configProp)
       {
-      std::string configPropName = "COMPILE_DEFINITIONS_"
-                                          + cmSystemTools::UpperCase(config);
-      const char *configProp = this->GetProperty(configPropName);
-      if (configProp)
+      switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0043))
         {
-        switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0043))
+        case cmPolicies::WARN:
           {
-          case cmPolicies::WARN:
-            {
-            cmOStringStream e;
-            e << this->Makefile->GetCMakeInstance()->GetPolicies()
-                     ->GetPolicyWarning(cmPolicies::CMP0043);
-            this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
-                                         e.str());
-            }
-          case cmPolicies::OLD:
-            {
-            cmGeneratorExpression ge;
-            cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
-                                                        ge.Parse(configProp);
-            this->Internal
-              ->CachedLinkInterfaceCompileDefinitionsEntries[config]
-                  .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
-            }
-            break;
-          case cmPolicies::NEW:
-          case cmPolicies::REQUIRED_ALWAYS:
-          case cmPolicies::REQUIRED_IF_USED:
-            break;
+          cmOStringStream e;
+          e << this->Makefile->GetCMakeInstance()->GetPolicies()
+                   ->GetPolicyWarning(cmPolicies::CMP0043);
+          this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
+                                       e.str());
           }
+        case cmPolicies::OLD:
+          {
+          cmGeneratorExpression ge;
+          cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+                                                      ge.Parse(configProp);
+          linkInterfaceCompileDefinitionsEntries
+                .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
+          }
+          break;
+        case cmPolicies::NEW:
+        case cmPolicies::REQUIRED_ALWAYS:
+        case cmPolicies::REQUIRED_IF_USED:
+          break;
         }
       }
-
     }
 
   processCompileDefinitions(this,
-    this->Internal->CachedLinkInterfaceCompileDefinitionsEntries[config],
+                            linkInterfaceCompileDefinitionsEntries,
                             list,
                             uniqueOptions,
                             &dagChecker,
                             config,
                             debugDefines);
 
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(this->Internal
-                              ->CachedLinkInterfaceCompileDefinitionsEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceCompileDefinitionsDone[config]
-                                                                      = true;
-    }
+  deleteAndClear(linkInterfaceCompileDefinitionsEntries);
 }
 
 //----------------------------------------------------------------------------
@@ -2590,29 +2518,21 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result,
                             config,
                             debugFeatures);
 
-  if (!this->Internal->CacheLinkInterfaceCompileFeaturesDone[config])
-    {
-    this->Internal->AddInterfaceEntries(
-      this, config, "INTERFACE_COMPILE_FEATURES",
-      this->Internal->CachedLinkInterfaceCompileFeaturesEntries[config]);
-    }
+  std::vector<cmTargetInternals::TargetPropertyEntry*>
+    linkInterfaceCompileFeaturesEntries;
+  this->Internal->AddInterfaceEntries(
+    this, config, "INTERFACE_COMPILE_FEATURES",
+    linkInterfaceCompileFeaturesEntries);
 
   processCompileFeatures(this,
-    this->Internal->CachedLinkInterfaceCompileFeaturesEntries[config],
+                         linkInterfaceCompileFeaturesEntries,
                             result,
                             uniqueFeatures,
                             &dagChecker,
                             config,
                             debugFeatures);
 
-  if (!this->Makefile->IsGeneratingBuildSystem())
-    {
-    deleteAndClear(this->Internal->CachedLinkInterfaceCompileFeaturesEntries);
-    }
-  else
-    {
-    this->Internal->CacheLinkInterfaceCompileFeaturesDone[config] = true;
-    }
+  deleteAndClear(linkInterfaceCompileFeaturesEntries);
 }
 
 //----------------------------------------------------------------------------

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

Summary of changes:
 Source/cmGeneratorExpression.cxx          |    3 +
 Source/cmGeneratorExpression.h            |    5 +
 Source/cmGeneratorExpressionEvaluator.cxx |   10 +
 Source/cmGeneratorExpressionEvaluator.h   |    1 +
 Source/cmTarget.cxx                       |  380 ++++++++++-------------------
 5 files changed, 145 insertions(+), 254 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list