diff options
author | Brad King <brad.king@kitware.com> | 2008-12-16 14:14:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-12-16 14:14:40 (GMT) |
commit | 3cf9265fa7d1f6c7753ae5f19947409e4d9b8e9c (patch) | |
tree | 3fc931ad8e1d7e26aa00a41009e35cb53538bb12 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 63e186a8e69e0283d4fa0499ee8679ebdd844e1d (diff) | |
download | CMake-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.cxx | 10 |
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) { |