[Cmake-commits] CMake branch, next, updated. v3.0.0-4398-g5032630
Brad King
brad.king at kitware.com
Mon Jul 21 10:59:06 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 5032630277c8d8097404fe5cef6772d93793f06e (commit)
via b154a32dcd10cbf1653c3ba3e803edf86ff5def7 (commit)
from fe74f3b9dc321a3340b9e96646a193469d0be653 (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=5032630277c8d8097404fe5cef6772d93793f06e
commit 5032630277c8d8097404fe5cef6772d93793f06e
Merge: fe74f3b b154a32
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 21 10:59:05 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 21 10:59:05 2014 -0400
Merge topic 'target-drop-build-setting-cache' into next
b154a32d Revert topic 'target-drop-build-setting-cache'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b154a32dcd10cbf1653c3ba3e803edf86ff5def7
commit b154a32dcd10cbf1653c3ba3e803edf86ff5def7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 21 11:00:09 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 21 11:00:09 2014 -0400
Revert topic 'target-drop-build-setting-cache'
It contained changes not ready for testing.
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 7fc1464..2b4d955 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -97,7 +97,6 @@ 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;
@@ -125,7 +124,6 @@ const char *cmCompiledGeneratorExpression::Evaluate(
if (!context.HadError)
{
this->HadContextSensitiveCondition = context.HadContextSensitiveCondition;
- this->HadHeadSensitiveCondition = context.HadHeadSensitiveCondition;
}
this->DependTargets = context.DependTargets;
@@ -139,7 +137,6 @@ 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 b952520..324d23c 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -111,10 +111,6 @@ public:
{
return this->HadContextSensitiveCondition;
}
- bool GetHadHeadSensitiveCondition() const
- {
- return this->HadHeadSensitiveCondition;
- }
void SetEvaluateForBuildsystem(bool eval)
{
@@ -145,7 +141,6 @@ 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 3d03ece..28879f1 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -840,10 +840,6 @@ getLinkedTargetsContent(
{
context->HadContextSensitiveCondition = true;
}
- if (cge->GetHadHeadSensitiveCondition())
- {
- context->HadHeadSensitiveCondition = true;
- }
}
linkedTargetsContent =
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);
@@ -875,10 +871,6 @@ 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(),
@@ -1321,7 +1313,6 @@ 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;
@@ -1455,7 +1446,6 @@ 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 8a529e8..0ffb860 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -41,7 +41,6 @@ struct cmGeneratorExpressionContext
bool Quiet;
bool HadError;
bool HadContextSensitiveCondition;
- bool HadHeadSensitiveCondition;
bool EvaluateForBuildsystem;
};
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 9d00591..07f08de 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -196,9 +196,11 @@ public:
public:
TargetPropertyEntry(cmsys::auto_ptr<cmCompiledGeneratorExpression> cge,
cmLinkImplItem const& item = NoLinkImplItem)
- : ge(cge), LinkImplItem(item)
+ : ge(cge), Cached(false), LinkImplItem(item)
{}
const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge;
+ std::vector<std::string> CachedEntries;
+ bool Cached;
cmLinkImplItem const& LinkImplItem;
};
std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
@@ -211,6 +213,23 @@ 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;
@@ -230,8 +249,26 @@ 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);
}
//----------------------------------------------------------------------------
@@ -633,37 +670,49 @@ static bool processSources(cmTarget const* tgt,
for (std::vector<cmTargetInternals::TargetPropertyEntry*>::const_iterator
it = entries.begin(), end = entries.end(); it != end; ++it)
{
- std::vector<std::string> entrySources;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
- config,
- false,
- tgt,
- tgt,
- dagChecker),
- entrySources);
-
- if ((*it)->ge->GetHadContextSensitiveCondition())
+ bool cacheSources = false;
+ std::vector<std::string> entrySources = (*it)->CachedEntries;
+ if(entrySources.empty())
{
- contextDependent = true;
- }
+ cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+ config,
+ false,
+ tgt,
+ tgt,
+ dagChecker),
+ entrySources);
- for(std::vector<std::string>::iterator i = entrySources.begin();
- i != entrySources.end(); ++i)
- {
- std::string& src = *i;
+ if ((*it)->ge->GetHadContextSensitiveCondition())
+ {
+ contextDependent = true;
+ }
+ else if (mf->IsGeneratingBuildSystem())
+ {
+ cacheSources = true;
+ }
- cmSourceFile* sf = mf->GetOrCreateSource(src);
- std::string e;
- src = sf->GetFullPath(&e);
- if(src.empty())
+ for(std::vector<std::string>::iterator i = entrySources.begin();
+ i != entrySources.end(); ++i)
{
- if(!e.empty())
+ std::string& src = *i;
+
+ cmSourceFile* sf = mf->GetOrCreateSource(src);
+ std::string e;
+ src = sf->GetFullPath(&e);
+ if(src.empty())
{
- cmake* cm = mf->GetCMakeInstance();
- cm->IssueMessage(cmake::FATAL_ERROR, e,
- tgt->GetBacktrace());
+ if(!e.empty())
+ {
+ cmake* cm = mf->GetCMakeInstance();
+ cm->IssueMessage(cmake::FATAL_ERROR, e,
+ tgt->GetBacktrace());
+ }
+ return contextDependent;
}
- return contextDependent;
+ }
+ if (cacheSources)
+ {
+ (*it)->CachedEntries = entrySources;
}
}
std::string usedSources;
@@ -761,16 +810,16 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
config,
debugSources);
- std::vector<cmTargetInternals::TargetPropertyEntry*>
- linkInterfaceSourcesEntries;
-
- this->Internal->AddInterfaceEntries(
- this, config, "INTERFACE_SOURCES",
- linkInterfaceSourcesEntries);
+ if (!this->Internal->CacheLinkInterfaceSourcesDone[config])
+ {
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_SOURCES",
+ this->Internal->CachedLinkInterfaceSourcesEntries[config]);
+ }
- std::vector<std::string>::size_type numFilesBefore = files.size();
- bool contextDependentInterfaceSources = processSources(this,
- linkInterfaceSourcesEntries,
+ std::vector<std::string>::size_type numFilesBefore = files.size();
+ bool contextDependentInterfaceSources = processSources(this,
+ this->Internal->CachedLinkInterfaceSourcesEntries[config],
files,
uniqueSrcs,
&dagChecker,
@@ -783,7 +832,14 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
this->LinkImplementationLanguageIsContextDependent = false;
}
- deleteAndClear(linkInterfaceSourcesEntries);
+ if (!this->Makefile->IsGeneratingBuildSystem())
+ {
+ deleteAndClear(this->Internal->CachedLinkInterfaceSourcesEntries);
+ }
+ else
+ {
+ this->Internal->CacheLinkInterfaceSourcesDone[config] = true;
+ }
}
//----------------------------------------------------------------------------
@@ -1989,14 +2045,27 @@ static void processIncludeDirectories(cmTarget const* tgt,
std::string const& targetName = item;
bool const fromImported = item.Target && item.Target->IsImported();
bool const checkCMP0027 = item.FromGenex;
- std::vector<std::string> entryIncludes;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
- config,
- false,
- tgt,
- dagChecker),
- entryIncludes);
-
+ 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::string usedIncludes;
for(std::vector<std::string>::iterator
li = entryIncludes.begin(); li != entryIncludes.end(); ++li)
@@ -2078,7 +2147,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
}
}
- if (!cmSystemTools::IsOff(li->c_str()))
+ if (testIsOff && !cmSystemTools::IsOff(li->c_str()))
{
cmSystemTools::ConvertToUnixSlashes(*li);
}
@@ -2093,6 +2162,10 @@ static void processIncludeDirectories(cmTarget const* tgt,
}
}
}
+ if (cacheIncludes)
+ {
+ (*it)->CachedEntries = entryIncludes;
+ }
if (!usedIncludes.empty())
{
mf->GetCMakeInstance()->IssueMessage(cmake::LOG,
@@ -2140,47 +2213,58 @@ cmTarget::GetIncludeDirectories(const std::string& config) const
config,
debugIncludes);
- std::vector<cmTargetInternals::TargetPropertyEntry*>
- linkInterfaceIncludeDirectoriesEntries;
- this->Internal->AddInterfaceEntries(
- this, config, "INTERFACE_INCLUDE_DIRECTORIES",
- linkInterfaceIncludeDirectoriesEntries);
-
- if(this->Makefile->IsOn("APPLE"))
+ if (!this->Internal->CacheLinkInterfaceIncludeDirectoriesDone[config])
{
- 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());
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_INCLUDE_DIRECTORIES",
+ this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[config]);
- static cmsys::RegularExpression
- frameworkCheck("(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
- if(!frameworkCheck.find(libDir))
+ 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)
{
- continue;
- }
+ std::string libDir = cmSystemTools::CollapseFullPath(it->c_str());
+
+ 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());
- linkInterfaceIncludeDirectoriesEntries
- .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
+ cmGeneratorExpression ge;
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(libDir.c_str());
+ this->Internal
+ ->CachedLinkInterfaceIncludeDirectoriesEntries[config]
+ .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
+ }
}
}
processIncludeDirectories(this,
- linkInterfaceIncludeDirectoriesEntries,
+ this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries[config],
includes,
uniqueIncludes,
&dagChecker,
config,
debugIncludes);
- deleteAndClear(linkInterfaceIncludeDirectoriesEntries);
+ if (!this->Makefile->IsGeneratingBuildSystem())
+ {
+ deleteAndClear(
+ this->Internal->CachedLinkInterfaceIncludeDirectoriesEntries);
+ }
+ else
+ {
+ this->Internal->CacheLinkInterfaceIncludeDirectoriesDone[config]
+ = true;
+ }
return includes;
}
@@ -2198,16 +2282,33 @@ 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> entryOptions;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
- config,
- false,
- tgt,
- dagChecker),
- entryOptions);
+ 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::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;
@@ -2304,22 +2405,29 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
config,
debugOptions);
- std::vector<cmTargetInternals::TargetPropertyEntry*>
- linkInterfaceCompileOptionsEntries;
-
- this->Internal->AddInterfaceEntries(
- this, config, "INTERFACE_COMPILE_OPTIONS",
- linkInterfaceCompileOptionsEntries);
+ if (!this->Internal->CacheLinkInterfaceCompileOptionsDone[config])
+ {
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_COMPILE_OPTIONS",
+ this->Internal->CachedLinkInterfaceCompileOptionsEntries[config]);
+ }
processCompileOptions(this,
- linkInterfaceCompileOptionsEntries,
+ this->Internal->CachedLinkInterfaceCompileOptionsEntries[config],
result,
uniqueOptions,
&dagChecker,
config,
debugOptions);
- deleteAndClear(linkInterfaceCompileOptionsEntries);
+ if (!this->Makefile->IsGeneratingBuildSystem())
+ {
+ deleteAndClear(this->Internal->CachedLinkInterfaceCompileOptionsEntries);
+ }
+ else
+ {
+ this->Internal->CacheLinkInterfaceCompileOptionsDone[config] = true;
+ }
}
//----------------------------------------------------------------------------
@@ -2371,54 +2479,66 @@ void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
config,
debugDefines);
- std::vector<cmTargetInternals::TargetPropertyEntry*>
- linkInterfaceCompileDefinitionsEntries;
- this->Internal->AddInterfaceEntries(
- this, config, "INTERFACE_COMPILE_DEFINITIONS",
- linkInterfaceCompileDefinitionsEntries);
- if (!config.empty())
+ if (!this->Internal->CacheLinkInterfaceCompileDefinitionsDone[config])
{
- std::string configPropName = "COMPILE_DEFINITIONS_"
- + cmSystemTools::UpperCase(config);
- const char *configProp = this->GetProperty(configPropName);
- if (configProp)
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_COMPILE_DEFINITIONS",
+ this->Internal->CachedLinkInterfaceCompileDefinitionsEntries[config]);
+ if (!config.empty())
{
- switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0043))
+ std::string configPropName = "COMPILE_DEFINITIONS_"
+ + cmSystemTools::UpperCase(config);
+ const char *configProp = this->GetProperty(configPropName);
+ if (configProp)
{
- case cmPolicies::WARN:
- {
- cmOStringStream e;
- e << this->Makefile->GetCMakeInstance()->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0043);
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING,
- e.str());
- }
- case cmPolicies::OLD:
+ switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0043))
{
- cmGeneratorExpression ge;
- cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
- ge.Parse(configProp);
- linkInterfaceCompileDefinitionsEntries
- .push_back(new cmTargetInternals::TargetPropertyEntry(cge));
+ 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;
}
- break;
- case cmPolicies::NEW:
- case cmPolicies::REQUIRED_ALWAYS:
- case cmPolicies::REQUIRED_IF_USED:
- break;
}
}
+
}
processCompileDefinitions(this,
- linkInterfaceCompileDefinitionsEntries,
+ this->Internal->CachedLinkInterfaceCompileDefinitionsEntries[config],
list,
uniqueOptions,
&dagChecker,
config,
debugDefines);
- deleteAndClear(linkInterfaceCompileDefinitionsEntries);
+ if (!this->Makefile->IsGeneratingBuildSystem())
+ {
+ deleteAndClear(this->Internal
+ ->CachedLinkInterfaceCompileDefinitionsEntries);
+ }
+ else
+ {
+ this->Internal->CacheLinkInterfaceCompileDefinitionsDone[config]
+ = true;
+ }
}
//----------------------------------------------------------------------------
@@ -2470,21 +2590,29 @@ void cmTarget::GetCompileFeatures(std::vector<std::string> &result,
config,
debugFeatures);
- std::vector<cmTargetInternals::TargetPropertyEntry*>
- linkInterfaceCompileFeaturesEntries;
- this->Internal->AddInterfaceEntries(
- this, config, "INTERFACE_COMPILE_FEATURES",
- linkInterfaceCompileFeaturesEntries);
+ if (!this->Internal->CacheLinkInterfaceCompileFeaturesDone[config])
+ {
+ this->Internal->AddInterfaceEntries(
+ this, config, "INTERFACE_COMPILE_FEATURES",
+ this->Internal->CachedLinkInterfaceCompileFeaturesEntries[config]);
+ }
processCompileFeatures(this,
- linkInterfaceCompileFeaturesEntries,
+ this->Internal->CachedLinkInterfaceCompileFeaturesEntries[config],
result,
uniqueFeatures,
&dagChecker,
config,
debugFeatures);
- deleteAndClear(linkInterfaceCompileFeaturesEntries);
+ if (!this->Makefile->IsGeneratingBuildSystem())
+ {
+ deleteAndClear(this->Internal->CachedLinkInterfaceCompileFeaturesEntries);
+ }
+ else
+ {
+ this->Internal->CacheLinkInterfaceCompileFeaturesDone[config] = true;
+ }
}
//----------------------------------------------------------------------------
-----------------------------------------------------------------------
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, 254 insertions(+), 145 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list