diff options
author | Will Schroeder <will.schroeder@kitware.com> | 2001-03-02 18:47:33 (GMT) |
---|---|---|
committer | Will Schroeder <will.schroeder@kitware.com> | 2001-03-02 18:47:33 (GMT) |
commit | 9f98906e9218ab92ca78ed73add456363748b123 (patch) | |
tree | 02186d09b96d1bf5d6860a5883ac25ca5374b63d | |
parent | b6d1cda20e7d9b8d412a7281acb9157cff9cd362 (diff) | |
download | CMake-9f98906e9218ab92ca78ed73add456363748b123.zip CMake-9f98906e9218ab92ca78ed73add456363748b123.tar.gz CMake-9f98906e9218ab92ca78ed73add456363748b123.tar.bz2 |
BUG: repeat all -l options to avoid having to worry about link order.
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 58ac548..c5445f8 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -187,6 +187,7 @@ void cmUnixMakefileGenerator::OutputExecutableRules(std::ostream& fout) linkLibs += *j; linkLibs += " "; } + std::string librariesLinked; std::vector<std::string>& libs = m_Makefile->GetLinkLibraries(); for(j = libs.begin(); j != libs.end(); ++j) { @@ -194,11 +195,15 @@ void cmUnixMakefileGenerator::OutputExecutableRules(std::ostream& fout) if((pos == std::string::npos || pos > 0) && (*j).find("${") == std::string::npos) { - linkLibs += "-l"; + librariesLinked += "-l"; } - linkLibs += *j; - linkLibs += " "; + librariesLinked += *j; + librariesLinked += " "; } + // Add these in twice so order does not matter + linkLibs += librariesLinked; + linkLibs += librariesLinked; + std::vector<std::string>& libsUnix = m_Makefile->GetLinkLibrariesUnix(); for(j = libsUnix.begin(); j != libsUnix.end(); ++j) { |