diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-02-10 15:11:16 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-02-10 15:11:16 (GMT) |
commit | 6cccf0ab30fe93ee7ea2348c997ed4c404461bee (patch) | |
tree | 4df4944b568edb19c3fcc83166a103165a20fdf9 /Source/cmLocalGenerator.cxx | |
parent | 8b4af97281c4aa72482a8e387c064a59ec6b1ddf (diff) | |
download | CMake-6cccf0ab30fe93ee7ea2348c997ed4c404461bee.zip CMake-6cccf0ab30fe93ee7ea2348c997ed4c404461bee.tar.gz CMake-6cccf0ab30fe93ee7ea2348c997ed4c404461bee.tar.bz2 |
ENH: fix bug for single char libraries
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5fd0477..04ae274 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1466,8 +1466,8 @@ cmLocalGenerator::ComputeLinkInformation(cmTarget& target, } pos = lib.find_last_not_of(" \t\r\n"); if(pos != lib.npos) - { - lib = lib.substr(0, pos); + { + lib = lib.substr(0, pos+1); } if(lib.empty()) { @@ -1477,11 +1477,11 @@ cmLocalGenerator::ComputeLinkInformation(cmTarget& target, // Link to a library if it is not the same target and is meant for // this configuration type. if((target.GetType() == cmTarget::EXECUTABLE || - j->first != target.GetName()) && + lib != target.GetName()) && (j->second == cmTarget::GENERAL || j->second == linkType)) { // Compute the proper name to use to link this library. - cmTarget* tgt = m_GlobalGenerator->FindTarget(0, j->first.c_str()); + cmTarget* tgt = m_GlobalGenerator->FindTarget(0, lib.c_str()); if(tgt) { // This is a CMake target. Ask the target for its real name. @@ -1494,7 +1494,7 @@ cmLocalGenerator::ComputeLinkInformation(cmTarget& target, else { // This is not a CMake target. Use the name given. - linkLibraries.push_back(j->first); + linkLibraries.push_back(lib); } } } |