diff options
author | Brad King <brad.king@kitware.com> | 2017-04-10 18:48:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-11 14:09:57 (GMT) |
commit | 22829a130482511f8310caf74e190baee7ec763b (patch) | |
tree | fe2846f08b0578fccb7f6cde3421c06f6be8efd3 /Source/cmGeneratorExpressionNode.cxx | |
parent | 0419ecbcad7719614349a07189b45e341a8f2c69 (diff) | |
download | CMake-22829a130482511f8310caf74e190baee7ec763b.zip CMake-22829a130482511f8310caf74e190baee7ec763b.tar.gz CMake-22829a130482511f8310caf74e190baee7ec763b.tar.bz2 |
cmMakefile: Create an explicit "Object Libraries" source group
The generators should not need special logic to place object library
object files in this group.
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 4443499..8b2c7aa 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -14,7 +14,6 @@ #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmPolicies.h" -#include "cmSourceFile.h" #include "cmStateTypes.h" #include "cmSystemTools.h" #include "cmTarget.h" @@ -34,6 +33,8 @@ #include <string.h> #include <utility> +class cmSourceFile; + std::string cmGeneratorExpressionNode::EvaluateDependentExpression( std::string const& prop, cmLocalGenerator* lg, cmGeneratorExpressionContext* context, cmGeneratorTarget const* headTarget, @@ -1265,6 +1266,8 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode gt->LocalGenerator->ComputeObjectFilenames(mapping, gt); + cmMakefile* mf = context->LG->GetMakefile(); + std::string obj_dir = gt->ObjectDirectory; std::string result; const char* sep = ""; @@ -1278,10 +1281,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode assert(!map_it->second.empty()); result += sep; std::string objFile = obj_dir + map_it->second; - cmSourceFile* sf = - context->LG->GetMakefile()->GetOrCreateSource(objFile, true); - sf->SetObjectLibrary(tgtName); - sf->SetProperty("EXTERNAL_OBJECT", "1"); + mf->AddTargetObject(tgtName, objFile); result += objFile; sep = ";"; } |