summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-13 13:30:23 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-16 14:18:35 (GMT)
commitf5b06cda0f187929ac68ed64595c22d4e6ec773c (patch)
tree12e37e06684152c28d588f4d29573c25b3ec3280 /Source/cmNinjaTargetGenerator.cxx
parenta2514f15fae34abb6f29dddf6f5cfe8b171a8035 (diff)
downloadCMake-f5b06cda0f187929ac68ed64595c22d4e6ec773c.zip
CMake-f5b06cda0f187929ac68ed64595c22d4e6ec773c.tar.gz
CMake-f5b06cda0f187929ac68ed64595c22d4e6ec773c.tar.bz2
Pre-compute object file names before Ninja generation
Implement cmGlobalGenerator::ComputeTargetObjects in the Ninja generator to pre-compute all the object file names. Use the results during generation instead of re-computing it later.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 23662d9..cc67434 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -256,7 +256,10 @@ cmNinjaTargetGenerator
std::string path = this->LocalGenerator->GetHomeRelativeOutputPath();
if(!path.empty())
path += "/";
- path += this->LocalGenerator->GetObjectFileName(*this->Target, *source);
+ std::string const& objectName = this->GeneratorTarget->Objects[source];
+ path += this->LocalGenerator->GetTargetDirectory(*this->Target);
+ path += "/";
+ path += objectName;
return path;
}