diff options
author | Amitha Perera <perera@cs.rpi.edu> | 2002-05-29 19:00:37 (GMT) |
---|---|---|
committer | Amitha Perera <perera@cs.rpi.edu> | 2002-05-29 19:00:37 (GMT) |
commit | c24c2cca18c9bdf03de7e165259e3b87251ef1fe (patch) | |
tree | 916e760254c9d5ba28d9edff90b63c45cc443e44 | |
parent | 8f60b06037c9e922b9ddf00c679fba06e3da2f34 (diff) | |
download | CMake-c24c2cca18c9bdf03de7e165259e3b87251ef1fe.zip CMake-c24c2cca18c9bdf03de7e165259e3b87251ef1fe.tar.gz CMake-c24c2cca18c9bdf03de7e165259e3b87251ef1fe.tar.bz2 |
BUG: never make a target depend on itself. This was causing unnecessary library duplication, resulting in link errors on some platforms.
-rw-r--r-- | Source/cmTarget.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 121f308..04c9a4c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -104,6 +104,12 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const char *target, const char* lib, LinkLibraryType llt) { + // Never add a self dependency, even if the user asks for it. + if(strcmp( target, lib ) == 0) + { + return; + } + m_LinkLibraries.push_back( std::pair<std::string, cmTarget::LinkLibraryType>(lib,llt) ); if(llt != cmTarget::GENERAL) |