From 51997cb6dc93eff826e95ac326eb9af6763eaa32 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 15 Mar 2012 08:56:40 -0400 Subject: [PATCH] Ninja: Honor $ source expressions Add objects from object libraries referenced using this syntax to the set of objects linked in a target. --- Source/cmNinjaTargetGenerator.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2a784056a..675a160e0 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 objs; + this->GeneratorTarget->UseObjectLibraries(objs); + for(std::vector::iterator oi = objs.begin(); + oi != objs.end(); ++oi) + { + this->Objects.push_back(ConvertToNinjaPath(oi->c_str())); + } + } + this->GetBuildFileStream() << "\n"; }