summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpression.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-06 18:22:31 -0400
committerBrad King <brad.king@kitware.com>2018-09-10 07:51:44 -0400
commitf35be599612b788125d08a7c3e61d0fad3805bdd (patch)
tree49aa648c209a0e43674c3eba97016d1d167bb30c /Source/cmGeneratorExpression.cxx
parent1b57f49586afc9e8663d5e146732b1cd0597e7ef (diff)
downloadcmake-f35be599612b788125d08a7c3e61d0fad3805bdd.tar.gz
Fix transitive usage requirements through same-name imported targets
If two imported targets in different directories have the same name we should still be able to propagate transitive usage requirements from both. Fix the DAG checker to work with target pointers instead of target names since the pointers will not be duplicated even if the names are. Fixes: #18345
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 6d83a3f71c..658e9a7cde 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -13,7 +13,6 @@
#include "cmGeneratorExpressionEvaluator.h"
#include "cmGeneratorExpressionLexer.h"
#include "cmGeneratorExpressionParser.h"
-#include "cmGeneratorTarget.h"
#include "cmSystemTools.h"
cmGeneratorExpression::cmGeneratorExpression(
@@ -395,7 +394,7 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate(
// Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS
cmGeneratorExpressionDAGChecker dagChecker(
- this->HeadTarget->GetName(),
+ this->HeadTarget,
property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr,
nullptr);