summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-12-24 15:51:43 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-12-24 15:51:43 (GMT)
commitf3c42f593e6a4d084b6ac1bd70fa597f923a2cbc (patch)
tree9d9f5be4291fc40dcea676133b1ef1749da521f5 /Source
parent06bf73f9c3c41e6c9335962995bcda56d3aec494 (diff)
downloadCMake-f3c42f593e6a4d084b6ac1bd70fa597f923a2cbc.zip
CMake-f3c42f593e6a4d084b6ac1bd70fa597f923a2cbc.tar.gz
CMake-f3c42f593e6a4d084b6ac1bd70fa597f923a2cbc.tar.bz2
BUG: use full paths via pwd for -L paths on unix shells
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index e1f9eae..7493a06 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -697,6 +697,16 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
std::string libpath = this->ConvertToOutputForExisting(libDir->c_str());
if(emitted.insert(libpath).second)
{
+ std::string fullLibPath;
+ if(!m_WindowsShell)
+ {
+ fullLibPath = "\"`cd ";
+ }
+ fullLibPath += libpath;
+ if(!m_WindowsShell)
+ {
+ fullLibPath += ";pwd`\"";
+ }
std::string::size_type pos = libDir->find(libPathFlag.c_str());
if((pos == std::string::npos || pos > 0)
&& libDir->find("${") == std::string::npos)
@@ -704,13 +714,10 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
linkLibs += libPathFlag;
if(outputRuntime)
{
- std::string rpath = "\"`cd ";
- rpath += libpath;
- rpath += ";pwd`\"";
- runtimeDirs.push_back( rpath );
+ runtimeDirs.push_back( fullLibPath );
}
}
- linkLibs += libpath;
+ linkLibs += fullLibPath;
linkLibs += " ";
}
}