summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6ce8678..91258ed 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -110,15 +110,20 @@ cmGlobalUnixMakefileGenerator3
{
std::vector<cmSourceFile const*> objectSources;
gt->GetObjectSources(objectSources);
- // Compute the name of each object file.
- for(std::vector<cmSourceFile const*>::iterator
- si = objectSources.begin();
- si != objectSources.end(); ++si)
+
+ std::map<cmSourceFile const*, std::string> mapping;
+ for(std::vector<cmSourceFile const*>::const_iterator it
+ = objectSources.begin(); it != objectSources.end(); ++it)
+ {
+ mapping[*it];
+ }
+
+ gt->LocalGenerator->ComputeObjectFilenames(mapping, gt);
+
+ for(std::map<cmSourceFile const*, std::string>::const_iterator it
+ = mapping.begin(); it != mapping.end(); ++it)
{
- cmSourceFile const* sf = *si;
- std::string objectName = gt->LocalGenerator
- ->GetObjectFileNameWithoutTarget(*sf, gt->ObjectDirectory);
- gt->AddObject(sf, objectName);
+ gt->AddObject(it->first, it->second);
}
}