summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-12 20:09:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-13 14:27:23 (GMT)
commitcd43433de56ab31269a076fb2b2ace8babaa107d (patch)
tree3cfc978af258b7b0fc0b046b3d99be1b4cd01254 /Source/cmGlobalUnixMakefileGenerator3.cxx
parentd5b2e33be2119ad12744ed62920a8f8d9b6d705d (diff)
downloadCMake-cd43433de56ab31269a076fb2b2ace8babaa107d.zip
CMake-cd43433de56ab31269a076fb2b2ace8babaa107d.tar.gz
CMake-cd43433de56ab31269a076fb2b2ace8babaa107d.tar.bz2
cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface.
Make it public for future external calls.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 0e03e89..f9ec0a9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -108,15 +108,6 @@ void
cmGlobalUnixMakefileGenerator3
::ComputeTargetObjects(cmGeneratorTarget* gt) const
{
- cmTarget* target = gt->Target;
- // Compute full path to object file directory for this target.
- std::string dir_max;
- dir_max += gt->Makefile->GetCurrentOutputDirectory();
- dir_max += "/";
- dir_max += gt->LocalGenerator->GetTargetDirectory(*target);
- dir_max += "/";
- gt->ObjectDirectory = dir_max;
-
std::vector<cmSourceFile*> objectSources;
gt->GetObjectSources(objectSources);
// Compute the name of each object file.
@@ -126,11 +117,27 @@ cmGlobalUnixMakefileGenerator3
{
cmSourceFile* sf = *si;
std::string objectName = gt->LocalGenerator
- ->GetObjectFileNameWithoutTarget(*sf, dir_max);
+ ->GetObjectFileNameWithoutTarget(*sf, gt->ObjectDirectory);
gt->AddObject(sf, objectName);
}
}
+//----------------------------------------------------------------------------
+void
+cmGlobalUnixMakefileGenerator3
+::ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const
+{
+ cmTarget* target = gt->Target;
+
+ // Compute full path to object file directory for this target.
+ std::string dir_max;
+ dir_max += gt->Makefile->GetCurrentOutputDirectory();
+ dir_max += "/";
+ dir_max += gt->LocalGenerator->GetTargetDirectory(*target);
+ dir_max += "/";
+ gt->ObjectDirectory = dir_max;
+}
+
void cmGlobalUnixMakefileGenerator3::Configure()
{
// Initialize CMAKE_EDIT_COMMAND cache entry.