diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-04-30 19:41:19 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2014-07-17 15:17:50 (GMT) |
commit | 23d6520daae729e433fc9325eb53acb541979d0f (patch) | |
tree | a4bc3b0c1786593e91ab049fb637465b9626dad5 | |
parent | cd54f1dbeb5c71b400ccb0db81a0fcea45df46b8 (diff) | |
download | CMake-23d6520daae729e433fc9325eb53acb541979d0f.zip CMake-23d6520daae729e433fc9325eb53acb541979d0f.tar.gz CMake-23d6520daae729e433fc9325eb53acb541979d0f.tar.bz2 |
cmTarget: Allow caching of empty genex expansions
-rw-r--r-- | Source/cmTarget.cxx | 6 |
1 files 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<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; @@ -2269,7 +2270,7 @@ static void processCompileOptionsInternal(cmTarget const* tgt, std::vector<std::string>& entriesRef = (*it)->CachedEntries; std::vector<std::string> localEntries; std::vector<std::string>* 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 { |