diff options
author | Brad King <brad.king@kitware.com> | 2012-03-13 13:30:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-16 14:18:35 (GMT) |
commit | f5b06cda0f187929ac68ed64595c22d4e6ec773c (patch) | |
tree | 12e37e06684152c28d588f4d29573c25b3ec3280 /Source/cmLocalNinjaGenerator.cxx | |
parent | a2514f15fae34abb6f29dddf6f5cfe8b171a8035 (diff) | |
download | CMake-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/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 78072b5..425b219 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -117,37 +117,6 @@ cmGlobalNinjaGenerator* cmLocalNinjaGenerator::GetGlobalNinjaGenerator() return static_cast<cmGlobalNinjaGenerator*>(this->GetGlobalGenerator()); } -// TODO: Picked up from cmLocalUnixMakefileGenerator3. Refactor it. -std::string -cmLocalNinjaGenerator -::GetObjectFileName(const cmTarget& target, - const cmSourceFile& source) -{ - // Make sure we never hit this old case. - if(source.GetProperty("MACOSX_PACKAGE_LOCATION")) - { - std::string msg = "MACOSX_PACKAGE_LOCATION set on source file: "; - msg += source.GetFullPath(); - this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, - msg.c_str()); - } - - // Start with the target directory. - std::string obj = this->GetTargetDirectory(target); - obj += "/"; - - // Get the object file name without the target directory. - std::string dir_max; - dir_max += this->Makefile->GetCurrentOutputDirectory(); - dir_max += "/"; - dir_max += obj; - std::string objectName = - this->GetObjectFileNameWithoutTarget(source, dir_max, 0); - // Append the object name to the target directory. - obj += objectName; - return obj; -} - //---------------------------------------------------------------------------- // Virtual protected methods. |