diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-22 19:41:23 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-22 19:41:23 (GMT) |
commit | 7041af809dbf614c67e8449b2342c44b01cbf4cf (patch) | |
tree | cb5de04434033f004efea817c8d197b3f598e669 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 72fdb136521e892f3dc498472099ae4cfd62b008 (diff) | |
download | CMake-7041af809dbf614c67e8449b2342c44b01cbf4cf.zip CMake-7041af809dbf614c67e8449b2342c44b01cbf4cf.tar.gz CMake-7041af809dbf614c67e8449b2342c44b01cbf4cf.tar.bz2 |
ENH: more efficent fix for bug # 2063
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 76ceb84..1ccda4c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -889,10 +889,12 @@ void cmLocalVisualStudio7Generator::OutputLibraries(std::ostream& fout, debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); } } - // since windows is case insensitive then check for lower case .lib as - // at the end of the string, if not yet there add it. - std::string lowerCaseLib = cmSystemTools::LowerCase(j->first); - if(lowerCaseLib.rfind(".lib") != (lowerCaseLib.size()-4)) + // chop off the last 4 chars of the library string + std::string lowerCaseLibExt = j->first.substr(j->first.size()-4, 4); + // lower case the extension + lowerCaseLibExt = cmSystemTools::LowerCase(lowerCaseLibExt); + // now check to see if it was a .lib, if not then add a .lib + if(lowerCaseLibExt != ".lib") { lib += debugPostfix + ".lib"; } |