ENH: make more specific in reject self linking

This commit is contained in:
Ken Martin 2005-06-16 10:22:43 -04:00
parent 67c4e66845
commit 84dce824e5
1 changed files with 2 additions and 1 deletions

View File

@ -241,7 +241,8 @@ void cmOrderLinkDirectories::SetLinkInformation(const cmTarget& target,
continue;
}
// Don't link the library against itself!
if(targetLibrary && (lib->first == targetLibrary))
if(targetLibrary && (lib->first == targetLibrary) &&
target.GetType() != cmTarget::EXECUTABLE)
{
continue;
}