summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-12-16 14:14:40 (GMT)
committerBrad King <brad.king@kitware.com>2008-12-16 14:14:40 (GMT)
commit3cf9265fa7d1f6c7753ae5f19947409e4d9b8e9c (patch)
tree3fc931ad8e1d7e26aa00a41009e35cb53538bb12 /Source/cmLocalUnixMakefileGenerator3.cxx
parent63e186a8e69e0283d4fa0499ee8679ebdd844e1d (diff)
downloadCMake-3cf9265fa7d1f6c7753ae5f19947409e4d9b8e9c.zip
CMake-3cf9265fa7d1f6c7753ae5f19947409e4d9b8e9c.tar.gz
CMake-3cf9265fa7d1f6c7753ae5f19947409e4d9b8e9c.tar.bz2
ENH: Refactor passing of max length object dir
When computing the maximum length full path to the build directory under which object files will be placed, pass the actual path instead of just its length. This will be useful for error message generation.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index aae96ab..9517cd8 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1928,12 +1928,12 @@ cmLocalUnixMakefileGenerator3
obj += "/";
// Get the object file name without the target directory.
- std::string::size_type dir_len = 0;
- dir_len += strlen(this->Makefile->GetCurrentOutputDirectory());
- dir_len += 1;
- dir_len += obj.size();
+ std::string dir_max;
+ dir_max += this->Makefile->GetCurrentOutputDirectory();
+ dir_max += "/";
+ dir_max += obj;
std::string objectName =
- this->GetObjectFileNameWithoutTarget(source, dir_len,
+ this->GetObjectFileNameWithoutTarget(source, dir_max,
hasSourceExtension);
if(nameWithoutTargetDir)
{