diff options
author | Brad King <brad.king@kitware.com> | 2001-05-10 15:20:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-05-10 15:20:16 (GMT) |
commit | 968610b04192c8f35deb8e586479587f64e27865 (patch) | |
tree | 8d088fd3428959adcb17c7a8fef38530e87f53b1 /Source | |
parent | 09e9a53bb19b85aec9905c10b69ff6184f9b3d64 (diff) | |
download | CMake-968610b04192c8f35deb8e586479587f64e27865.zip CMake-968610b04192c8f35deb8e586479587f64e27865.tar.gz CMake-968610b04192c8f35deb8e586479587f64e27865.tar.bz2 |
BUG: Removed stray debugging output statement. Also renamed some variables for clarity.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 19dbd56..06109dc 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -177,34 +177,33 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, { // collect all the flags needed for linking libraries std::string linkLibs; - std::vector<std::string>::iterator j; std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories(); - for(j = libdirs.begin(); j != libdirs.end(); ++j) + for(std::vector<std::string>::iterator libDir = libdirs.begin(); + libDir != libdirs.end(); ++libDir) { - std::string::size_type pos = (*j).find("-L"); + std::string::size_type pos = libDir->find("-L"); if((pos == std::string::npos || pos > 0) - && (*j).find("${") == std::string::npos) + && libDir->find("${") == std::string::npos) { linkLibs += "-L"; } - linkLibs += cmSystemTools::EscapeSpaces(j->c_str()); + linkLibs += cmSystemTools::EscapeSpaces(libDir->c_str()); linkLibs += " "; } std::string librariesLinked; const cmTarget::LinkLibraries& libs = tgt.GetLinkLibraries(); - cmTarget::LinkLibraries::const_iterator j2; - for(j2 = libs.begin(); j2 != libs.end(); ++j2) + for(cmTarget::LinkLibraries::const_iterator lib = libs.begin(); + lib != libs.end(); ++lib) { // Don't link the library against itself! - if(targetLibrary && (j2->first == targetLibrary)) continue; + if(targetLibrary && (lib->first == targetLibrary)) continue; // don't look at debug libraries - if (j2->second == cmTarget::DEBUG) continue; - std::cerr << j2->first.c_str() << "\n"; + if (lib->second == cmTarget::DEBUG) continue; - if(j2->first.find('/') != std::string::npos) + if(lib->first.find('/') != std::string::npos) { std::string dir, file; - cmSystemTools::SplitProgramPath(j2->first.c_str(), + cmSystemTools::SplitProgramPath(lib->first.c_str(), dir, file); linkLibs += "-L"; linkLibs += cmSystemTools::EscapeSpaces(dir.c_str()); @@ -215,13 +214,13 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout, } else { - std::string::size_type pos = j2->first.find("-l"); + std::string::size_type pos = lib->first.find("-l"); if((pos == std::string::npos || pos > 0) - && j2->first.find("${") == std::string::npos) + && lib->first.find("${") == std::string::npos) { librariesLinked += "-l"; } - librariesLinked += j2->first; + librariesLinked += lib->first; librariesLinked += " "; } } |