diff options
author | Brad King <brad.king@kitware.com> | 2004-01-23 14:54:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-01-23 14:54:50 (GMT) |
commit | ed1c2573aa39b2773002f7bc09b3908a33771053 (patch) | |
tree | f416bc2fd02ddc11fe115deffd20b9af8d785252 /Source/cmLocalGenerator.cxx | |
parent | 15fb761319334405c1399cd8c17c51daa83ccade (diff) | |
download | CMake-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.cxx | 16 |
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; } |