summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-23 14:41:45 (GMT)
committerBrad King <brad.king@kitware.com>2014-01-02 18:45:41 (GMT)
commit03f3b4e727d7d5f6c3ba4f0a64a2f440cff43a7d (patch)
treee43b50692dafbbc1bd2cf51060bb3a536db85f88 /Source/cmMakefileTargetGenerator.cxx
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-03f3b4e727d7d5f6c3ba4f0a64a2f440cff43a7d.zip
CMake-03f3b4e727d7d5f6c3ba4f0a64a2f440cff43a7d.tar.gz
CMake-03f3b4e727d7d5f6c3ba4f0a64a2f440cff43a7d.tar.bz2
Replace <OBJECT_DIR> rule placeholder consistently (#14667)
The <OBJECT_DIR> placeholder is supposed to be the base intermediate files directory for the current target. This is how it gets replaced during link line generation. However, during compile line generation we replace it with the directory containing the current object file which may be a subdirectory. Fix replacement of <OBJECT_DIR> in the generated compile lines to be the base intermediate files directory. This was expoxed by commit 42ba1b08 (VS: Separate compiler and linker PDB files, 2013-04-05) when we added a "/Fd<OBJECT_DIR>/" flag to the MSVC compile line in order to match the VS IDE default compiler program database location in the intermediate files directory. For source files in a subdirectory relative to the current target this caused the wrong location to be used for the compiler program database. This becomes particularly important when using precompiled headers. While at it, use the cmTarget::GetSupportDirectory method to compute the intermediate files directory for the current target instead of repeating the logic in a few places.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 0829cab..5e6c548 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -638,7 +638,7 @@ cmMakefileTargetGenerator
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL).c_str();
vars.Object = shellObj.c_str();
- std::string objectDir = cmSystemTools::GetFilenamePath(obj);
+ std::string objectDir = this->Target->GetSupportDirectory();
objectDir = this->Convert(objectDir.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::SHELL);