summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-01-17 20:09:25 (GMT)
committerBrad King <brad.king@kitware.com>2005-01-17 20:09:25 (GMT)
commit97a3d514acb8ce01839ebec0316277b9155518c2 (patch)
treeb57e60dcdba4a5d98c401d3e3cae6f52038e350f
parente6e98b47da42835544fc817a44c43c9896994706 (diff)
downloadCMake-97a3d514acb8ce01839ebec0316277b9155518c2.zip
CMake-97a3d514acb8ce01839ebec0316277b9155518c2.tar.gz
CMake-97a3d514acb8ce01839ebec0316277b9155518c2.tar.bz2
BUG: Fix for relative path conversion when path is a subset of relative path root.
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 99acf28..c55831c 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -2022,14 +2022,16 @@ cmLocalUnixMakefileGenerator2::ConvertToRelativePath(const char* p)
}
// If the entire path is in common then just return a ".".
- if(common == path.size())
+ if(common == path.size() &&
+ common == m_CurrentOutputDirectoryComponents.size())
{
return ".";
}
// If the entire path is in common except for a trailing slash then
// just return a "./".
- if(common+1 == path.size() && path[common].size() == 0)
+ if(common+1 == path.size() && path[common].size() == 0 &&
+ common == m_CurrentOutputDirectoryComponents.size())
{
return "./";
}