summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-14 16:35:37 (GMT)
committerBrad King <brad.king@kitware.com>2006-03-14 16:35:37 (GMT)
commit8e702ac5a800fcd4fce0984b7a0e439b77d68ae9 (patch)
tree47b946e756be816b01d60a988547f3717d0b0656 /Source/cmLocalUnixMakefileGenerator3.cxx
parentc332ff41f10f6ef50dcaf806314696f3d9e79250 (diff)
downloadCMake-8e702ac5a800fcd4fce0984b7a0e439b77d68ae9.zip
CMake-8e702ac5a800fcd4fce0984b7a0e439b77d68ae9.tar.gz
CMake-8e702ac5a800fcd4fce0984b7a0e439b77d68ae9.tar.bz2
BUG: Fixed object file name construction to use Convert method for relative path conversion. Also fixed test of result to check explicitly for a full path.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 72cb2b6..dfe05d1 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1509,19 +1509,19 @@ cmLocalUnixMakefileGenerator3
{
// If the source file is located below the current binary directory
// then use that relative path for the object file name.
- std::string objectName =
- cmSystemTools::RelativePath(m_Makefile->GetCurrentOutputDirectory(),
- source.GetFullPath().c_str());
- if(objectName.empty() || objectName[0] == '.')
+ std::string objectName = this->Convert(source.GetFullPath().c_str(),
+ START_OUTPUT);
+ if(cmSystemTools::FileIsFullPath(objectName.c_str()) ||
+ objectName.empty() || objectName[0] == '.')
{
// If the source file is located below the current source
// directory then use that relative path for the object file name.
// Otherwise just use the relative path from the current binary
// directory.
- std::string relFromSource =
- cmSystemTools::RelativePath(m_Makefile->GetCurrentDirectory(),
- source.GetFullPath().c_str());
- if(!relFromSource.empty() && relFromSource[0] != '.')
+ std::string relFromSource = this->Convert(source.GetFullPath().c_str(),
+ START);
+ if(!cmSystemTools::FileIsFullPath(relFromSource.c_str()) &&
+ !relFromSource.empty() && relFromSource[0] != '.')
{
objectName = relFromSource;
}