From 5e07dcf7c8e884380e1ad5ab64ba3bcdef601eee Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 30 Jun 2014 11:39:09 -0400 Subject: cmTarget: Add to LinkImplementation whether each library was a genex Implementation of CMP0027 OLD behavior needs to know whether each entry in LinkImplementation::Libraries came from a generator expression or not. Add a FromGenex member to cmLinkImplItem to record this. --- Source/cmTarget.cxx | 12 +++++------- Source/cmTarget.h | 10 ++++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 98a9920..9ba8456 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6509,12 +6509,9 @@ void cmTarget::ComputeLinkImplementation(const std::string& config, cmGeneratorExpression ge(&le->Backtrace); cmsys::auto_ptr const cge = ge.Parse(le->Value); - cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, - config, - false, - head, - &dagChecker), - llibs); + std::string const evaluated = + cge->Evaluate(this->Makefile, config, false, head, &dagChecker); + cmSystemTools::ExpandListArgument(evaluated, llibs); for(std::vector::const_iterator li = llibs.begin(); li != llibs.end(); ++li) @@ -6562,7 +6559,8 @@ void cmTarget::ComputeLinkImplementation(const std::string& config, // The entry is meant for this configuration. impl.Libraries.push_back( - cmLinkImplItem(name, this->FindTargetToLink(name), le->Backtrace)); + cmLinkImplItem(name, this->FindTargetToLink(name), + le->Backtrace, evaluated != le->Value)); } std::set const& seenProps = cge->GetSeenTargetProperties(); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 5f2a557..dc67f1e 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -57,14 +57,16 @@ public: class cmLinkImplItem: public cmLinkItem { public: - cmLinkImplItem(): cmLinkItem(), Backtrace(0) {} + cmLinkImplItem(): cmLinkItem(), Backtrace(0), FromGenex(false) {} cmLinkImplItem(std::string const& n, cmTarget const* t, - cmListFileBacktrace const& bt): - cmLinkItem(n, t), Backtrace(bt) {} + cmListFileBacktrace const& bt, + bool fromGenex): + cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {} cmLinkImplItem(cmLinkImplItem const& r): - cmLinkItem(r), Backtrace(r.Backtrace) {} + cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {} cmListFileBacktrace Backtrace; + bool FromGenex; }; struct cmTargetLinkInformationMap: -- cgit v0.12