[Cmake-commits] [cmake-commits] king committed cmComputeLinkDepends.cxx 1.22 1.23 cmComputeLinkDepends.h 1.11 1.12
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Aug 27 10:21:53 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv32539/Source
Modified Files:
cmComputeLinkDepends.cxx cmComputeLinkDepends.h
Log Message:
BUG: Do not infer dependencies of link flags
In cmComputeLinkDepends link items that look like flags (starting in
'-') should not be included in dependency inferral. They are not
libraries and therefore have no dependencies. They should just be
passed through to the final link line unchanged. See issue #7546.
Index: cmComputeLinkDepends.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** cmComputeLinkDepends.h 6 Aug 2008 21:48:53 -0000 1.11
--- cmComputeLinkDepends.h 27 Aug 2008 14:21:50 -0000 1.12
***************
*** 47,53 ****
cmTarget* Target;
bool IsSharedDep;
! LinkEntry(): Item(), Target(0), IsSharedDep(false) {}
LinkEntry(LinkEntry const& r):
! Item(r.Item), Target(r.Target), IsSharedDep(r.IsSharedDep) {}
};
--- 47,55 ----
cmTarget* Target;
bool IsSharedDep;
! bool IsFlag;
! LinkEntry(): Item(), Target(0), IsSharedDep(false), IsFlag(false) {}
LinkEntry(LinkEntry const& r):
! Item(r.Item), Target(r.Target), IsSharedDep(r.IsSharedDep),
! IsFlag(r.IsFlag) {}
};
Index: cmComputeLinkDepends.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmComputeLinkDepends.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** cmComputeLinkDepends.cxx 27 Aug 2008 14:21:41 -0000 1.22
--- cmComputeLinkDepends.cxx 27 Aug 2008 14:21:50 -0000 1.23
***************
*** 51,55 ****
names correspond to targets (built or imported) and those for which an
old-style <item>_LIB_DEPENDS variable is defined. All other items are
! unknown and we must infer dependencies for them.
Known items have dependency lists ordered based on how the user
--- 51,57 ----
names correspond to targets (built or imported) and those for which an
old-style <item>_LIB_DEPENDS variable is defined. All other items are
! unknown and we must infer dependencies for them. For items that look
! like flags (beginning with '-') we trivially infer no dependencies,
! and do not include them in the dependencies of other items.
Known items have dependency lists ordered based on how the user
***************
*** 294,297 ****
--- 296,300 ----
entry.Item = item;
entry.Target = this->FindTargetToLink(entry.Item.c_str());
+ entry.IsFlag = !entry.Target && item[0] == '-';
// If the item has dependencies queue it to follow them.
***************
*** 313,317 ****
this->BFSQueue.push(qe);
}
! else
{
// The item dependencies are not known. We need to infer them.
--- 316,320 ----
this->BFSQueue.push(qe);
}
! else if(!entry.IsFlag)
{
// The item dependencies are not known. We need to infer them.
***************
*** 556,560 ****
if(depender_index >= 0)
{
! this->EntryConstraintGraph[dependee_index].push_back(depender_index);
}
else
--- 559,566 ----
if(depender_index >= 0)
{
! if(!this->EntryList[dependee_index].IsFlag)
! {
! this->EntryConstraintGraph[dependee_index].push_back(depender_index);
! }
}
else
***************
*** 573,576 ****
--- 579,583 ----
// targets.
if(!this->EntryList[dependee_index].Target &&
+ !this->EntryList[dependee_index].IsFlag &&
dependee_index != dsi->first)
{
More information about the Cmake-commits
mailing list