From 23d6520daae729e433fc9325eb53acb541979d0f Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 30 Apr 2014 15:41:19 -0400 Subject: cmTarget: Allow caching of empty genex expansions --- Source/cmTarget.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5836d7b..67b3c11 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -176,10 +176,11 @@ public: public: TargetPropertyEntry(cmsys::auto_ptr cge, cmLinkImplItem const& item = NoLinkImplItem) - : ge(cge), LinkImplItem(item) + : ge(cge), Cached(false), LinkImplItem(item) {} const cmsys::auto_ptr ge; std::vector CachedEntries; + bool Cached; cmLinkImplItem const& LinkImplItem; }; std::vector IncludeDirectoriesEntries; @@ -2269,7 +2270,7 @@ static void processCompileOptionsInternal(cmTarget const* tgt, std::vector& entriesRef = (*it)->CachedEntries; std::vector localEntries; std::vector* entryOptions = &entriesRef; - if(entryOptions->empty()) + if(!(*it)->Cached) { cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf, config, @@ -2282,6 +2283,7 @@ static void processCompileOptionsInternal(cmTarget const* tgt, { // Cache the result. *entryOptions = localEntries; + (*it)->Cached = true; } else { -- cgit v0.12