summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-01 14:59:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-01 14:59:46 (GMT)
commit3e0817eb55f087a60d0676b5bb95fa0a0be62196 (patch)
tree8e62f09d3192bc57dd32b2b1e22e515b9a0efc7e
parente2ed5d1c6443f976e70edf47e7ae580058615a5c (diff)
downloadCMake-3e0817eb55f087a60d0676b5bb95fa0a0be62196.zip
CMake-3e0817eb55f087a60d0676b5bb95fa0a0be62196.tar.gz
CMake-3e0817eb55f087a60d0676b5bb95fa0a0be62196.tar.bz2
BUG: fix non relative paths
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 7c90bc8..5cb89d3 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -1367,16 +1367,22 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
target += name;
target += cmSystemTools::GetExecutableExtension();
target = this->ConvertToRelativeOutputPath(target.c_str());
- cmSystemTools::ConvertToUnixSlashes(target);
bool needsLocalTarget = false;
- std::string tgt = this->ConvertToMakeTarget(target.c_str());
- if(tgt.find('/', 0) != tgt.npos)
+ if(m_UseRelativePaths)
+ {
+ cmSystemTools::ConvertToUnixSlashes(target);
+ bool needsLocalTarget = false;
+ std::string tgt = this->ConvertToMakeTarget(target.c_str());
+ if(tgt.find('/', 0) != tgt.npos)
+ {
+ needsLocalTarget = true;
+ }
+ target = cmSystemTools::ConvertToOutputPath(target.c_str());
+ }
+ else
{
needsLocalTarget = true;
}
- target = cmSystemTools::ConvertToOutputPath(target.c_str());
-
-
std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") ";
std::string depend = "$(";
depend += this->CreateMakeVariable(name, "_SRC_OBJS")