diff options
author | Brad King <brad.king@kitware.com> | 2012-03-07 19:01:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-09 20:16:02 (GMT) |
commit | 3baaf6ccecb9117b613fc89cd37206960298dfaa (patch) | |
tree | 12e5a8e3b6df8faed7a386500768f008f6cf3ce6 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 62a841b80b5f4b4f9cc0ddba77ae010a29b0e27e (diff) | |
download | CMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.zip CMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.tar.gz CMake-3baaf6ccecb9117b613fc89cd37206960298dfaa.tar.bz2 |
Pre-compute object file names before Makefile generation
Add a virtual cmGlobalGenerator::ComputeTargetObjects method invoked
during cmGeneratorTarget construction. Implement it in the Makefile
generator to pre-compute all object file names for each target. Use
the results during generation instead of re-computing it later.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index fdf59b2..b991b25 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -2009,45 +2009,6 @@ void cmLocalUnixMakefileGenerator3 } //---------------------------------------------------------------------------- -std::string -cmLocalUnixMakefileGenerator3 -::GetObjectFileName(cmTarget& target, - const cmSourceFile& source, - std::string* nameWithoutTargetDir, - bool* hasSourceExtension) -{ - // 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, - hasSourceExtension); - if(nameWithoutTargetDir) - { - *nameWithoutTargetDir = objectName; - } - - // Append the object name to the target directory. - obj += objectName; - return obj; -} - -//---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator3::WriteDisclaimer(std::ostream& os) { os |