summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-03-15 12:56:40 (GMT)
committerBrad King <brad.king@kitware.com>2012-03-16 14:19:44 (GMT)
commit51997cb6dc93eff826e95ac326eb9af6763eaa32 (patch)
tree743d15f82628573f525bc0e096f453e3459b6e57 /Source
parent23ec258fce110a63e3d7bde711dc127e220639d4 (diff)
downloadCMake-51997cb6dc93eff826e95ac326eb9af6763eaa32.zip
CMake-51997cb6dc93eff826e95ac326eb9af6763eaa32.tar.gz
CMake-51997cb6dc93eff826e95ac326eb9af6763eaa32.tar.bz2
Ninja: Honor $<TARGET_OBJECTS:...> source expressions
Add objects from object libraries referenced using this syntax to the set of objects linked in a target.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 2a78405..675a160 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -406,6 +406,17 @@ cmNinjaTargetGenerator
this->WriteObjectBuildStatement(*si);
}
+ {
+ // Add object library contents as external objects.
+ std::vector<std::string> objs;
+ this->GeneratorTarget->UseObjectLibraries(objs);
+ for(std::vector<std::string>::iterator oi = objs.begin();
+ oi != objs.end(); ++oi)
+ {
+ this->Objects.push_back(ConvertToNinjaPath(oi->c_str()));
+ }
+ }
+
this->GetBuildFileStream() << "\n";
}