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.
This commit is contained in:
Brad King 2014-06-30 11:39:09 -04:00
parent f77b384cf6
commit 5e07dcf7c8
2 changed files with 11 additions and 11 deletions

View File

@ -6509,12 +6509,9 @@ void cmTarget::ComputeLinkImplementation(const std::string& config,
cmGeneratorExpression ge(&le->Backtrace); cmGeneratorExpression ge(&le->Backtrace);
cmsys::auto_ptr<cmCompiledGeneratorExpression> const cge = cmsys::auto_ptr<cmCompiledGeneratorExpression> const cge =
ge.Parse(le->Value); ge.Parse(le->Value);
cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, std::string const evaluated =
config, cge->Evaluate(this->Makefile, config, false, head, &dagChecker);
false, cmSystemTools::ExpandListArgument(evaluated, llibs);
head,
&dagChecker),
llibs);
for(std::vector<std::string>::const_iterator li = llibs.begin(); for(std::vector<std::string>::const_iterator li = llibs.begin();
li != llibs.end(); ++li) li != llibs.end(); ++li)
@ -6562,7 +6559,8 @@ void cmTarget::ComputeLinkImplementation(const std::string& config,
// The entry is meant for this configuration. // The entry is meant for this configuration.
impl.Libraries.push_back( impl.Libraries.push_back(
cmLinkImplItem(name, this->FindTargetToLink(name), le->Backtrace)); cmLinkImplItem(name, this->FindTargetToLink(name),
le->Backtrace, evaluated != le->Value));
} }
std::set<std::string> const& seenProps = cge->GetSeenTargetProperties(); std::set<std::string> const& seenProps = cge->GetSeenTargetProperties();

View File

@ -57,14 +57,16 @@ public:
class cmLinkImplItem: public cmLinkItem class cmLinkImplItem: public cmLinkItem
{ {
public: public:
cmLinkImplItem(): cmLinkItem(), Backtrace(0) {} cmLinkImplItem(): cmLinkItem(), Backtrace(0), FromGenex(false) {}
cmLinkImplItem(std::string const& n, cmLinkImplItem(std::string const& n,
cmTarget const* t, cmTarget const* t,
cmListFileBacktrace const& bt): cmListFileBacktrace const& bt,
cmLinkItem(n, t), Backtrace(bt) {} bool fromGenex):
cmLinkItem(n, t), Backtrace(bt), FromGenex(fromGenex) {}
cmLinkImplItem(cmLinkImplItem const& r): cmLinkImplItem(cmLinkImplItem const& r):
cmLinkItem(r), Backtrace(r.Backtrace) {} cmLinkItem(r), Backtrace(r.Backtrace), FromGenex(r.FromGenex) {}
cmListFileBacktrace Backtrace; cmListFileBacktrace Backtrace;
bool FromGenex;
}; };
struct cmTargetLinkInformationMap: struct cmTargetLinkInformationMap: