cmTarget: Allow caching of empty genex expansions
This commit is contained in:
parent
cd54f1dbeb
commit
23d6520daa
|
@ -176,10 +176,11 @@ public:
|
||||||
public:
|
public:
|
||||||
TargetPropertyEntry(cmsys::auto_ptr<cmCompiledGeneratorExpression> cge,
|
TargetPropertyEntry(cmsys::auto_ptr<cmCompiledGeneratorExpression> cge,
|
||||||
cmLinkImplItem const& item = NoLinkImplItem)
|
cmLinkImplItem const& item = NoLinkImplItem)
|
||||||
: ge(cge), LinkImplItem(item)
|
: ge(cge), Cached(false), LinkImplItem(item)
|
||||||
{}
|
{}
|
||||||
const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge;
|
const cmsys::auto_ptr<cmCompiledGeneratorExpression> ge;
|
||||||
std::vector<std::string> CachedEntries;
|
std::vector<std::string> CachedEntries;
|
||||||
|
bool Cached;
|
||||||
cmLinkImplItem const& LinkImplItem;
|
cmLinkImplItem const& LinkImplItem;
|
||||||
};
|
};
|
||||||
std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
|
std::vector<TargetPropertyEntry*> IncludeDirectoriesEntries;
|
||||||
|
@ -2269,7 +2270,7 @@ static void processCompileOptionsInternal(cmTarget const* tgt,
|
||||||
std::vector<std::string>& entriesRef = (*it)->CachedEntries;
|
std::vector<std::string>& entriesRef = (*it)->CachedEntries;
|
||||||
std::vector<std::string> localEntries;
|
std::vector<std::string> localEntries;
|
||||||
std::vector<std::string>* entryOptions = &entriesRef;
|
std::vector<std::string>* entryOptions = &entriesRef;
|
||||||
if(entryOptions->empty())
|
if(!(*it)->Cached)
|
||||||
{
|
{
|
||||||
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
|
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
|
||||||
config,
|
config,
|
||||||
|
@ -2282,6 +2283,7 @@ static void processCompileOptionsInternal(cmTarget const* tgt,
|
||||||
{
|
{
|
||||||
// Cache the result.
|
// Cache the result.
|
||||||
*entryOptions = localEntries;
|
*entryOptions = localEntries;
|
||||||
|
(*it)->Cached = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue