diff options
author | Brad King <brad.king@kitware.com> | 2008-04-23 04:40:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-04-23 04:40:12 (GMT) |
commit | bd09f6eabc90f03283509b26a2b57bdc42f8eeba (patch) | |
tree | 3cede57eb596699bce8bc809adcfc8161fe8f00e /Source/cmComputeLinkDepends.cxx | |
parent | cbdc1d6e19238d14a779ae88e2822bf519a016f7 (diff) | |
download | CMake-bd09f6eabc90f03283509b26a2b57bdc42f8eeba.zip CMake-bd09f6eabc90f03283509b26a2b57bdc42f8eeba.tar.gz CMake-bd09f6eabc90f03283509b26a2b57bdc42f8eeba.tar.bz2 |
ENH: Simplify link lines in some cases by not allowing targets to be inferred dependees of items with unknown dependencies.
Diffstat (limited to 'Source/cmComputeLinkDepends.cxx')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index e232525..3632ff6 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -100,6 +100,9 @@ For the unknown items, we infer dependencies by looking at the B: intersect( {Y,C} , {} ) = {} ; infer no edges C: intersect( {} , {B} ) = {} ; infer no edges +Note that targets are never inferred as dependees because outside +libraries should not depend on them. + ------------------------------------------------------------------------------ Once the complete graph is formed from all known and inferred @@ -548,7 +551,12 @@ cmComputeLinkDepends::AddLinkEntries(int depender_index, for(std::map<int, DependSet>::iterator dsi = dependSets.begin(); dsi != dependSets.end(); ++dsi) { - if(dependee_index != dsi->first) + // Add this item to the inferred dependencies of other items. + // Target items are never inferred dependees because unknown + // items are outside libraries that should not be depending on + // targets. + if(!this->EntryList[dependee_index].Target && + dependee_index != dsi->first) { dsi->second.insert(dependee_index); } |