summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-01-23 14:54:50 (GMT)
committerBrad King <brad.king@kitware.com>2004-01-23 14:54:50 (GMT)
commited1c2573aa39b2773002f7bc09b3908a33771053 (patch)
treef416bc2fd02ddc11fe115deffd20b9af8d785252 /Source/cmLocalGenerator.cxx
parent15fb761319334405c1399cd8c17c51daa83ccade (diff)
downloadCMake-ed1c2573aa39b2773002f7bc09b3908a33771053.zip
CMake-ed1c2573aa39b2773002f7bc09b3908a33771053.tar.gz
CMake-ed1c2573aa39b2773002f7bc09b3908a33771053.tar.bz2
BUG: Fix to build rule generation with relative paths.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index d6413c7..603bee1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -183,8 +183,11 @@ std::string cmLocalGenerator::ConvertToRelativeOutputPath(const char* p)
{
ret = relpath;
}
+
+ // Relative paths should always start in a '.', so add a './' if
+ // necessary.
if(ret.size()
- && ret[0] != '\"' && ret[0] != '/' && ret[0] != '.')
+ && ret[0] != '\"' && ret[0] != '/' && ret[0] != '.' && ret[0] != '$')
{
if(ret.size() > 1 && ret[1] != ':')
{
@@ -192,16 +195,5 @@ std::string cmLocalGenerator::ConvertToRelativeOutputPath(const char* p)
}
}
ret = cmSystemTools::ConvertToOutputPath(ret.c_str());
- if(ret.size() > 2 &&
- (ret[0] == '.') &&
- ( (ret[1] == '/') || ret[1] == '\\'))
- {
- std::string upath = ret;
- cmSystemTools::ConvertToUnixSlashes(upath);
- if(upath.find(2, '/') == upath.npos)
- {
- ret = ret.substr(2, ret.size()-2);
- }
- }
return ret;
}