summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-07-06 13:06:53 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-07-06 14:15:43 (GMT)
commit913ea78d7a22302fcaecb284096239bdb05b6206 (patch)
tree109938d99efb12ab3be17643e6897c9176c26085 /Source/cmGeneratorExpressionDAGChecker.cxx
parent4a8db1783ccc48bfdb9060dfff5775ba42cd94cb (diff)
downloadCMake-913ea78d7a22302fcaecb284096239bdb05b6206.zip
CMake-913ea78d7a22302fcaecb284096239bdb05b6206.tar.gz
CMake-913ea78d7a22302fcaecb284096239bdb05b6206.tar.bz2
Genex LINK_LIBRARY and LINK_GROUP: check supported properties
Refines check for properties supporting these genex. Enhance error message. Fixes: #23699
Diffstat (limited to 'Source/cmGeneratorExpressionDAGChecker.cxx')
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index d35d428..6be5153 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -178,7 +178,7 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkOptionsExpression() const
}
bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(
- cmGeneratorTarget const* tgt) const
+ cmGeneratorTarget const* tgt, ForGenex genex) const
{
const auto* top = this->Top();
@@ -188,13 +188,17 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries(
return top->Target == tgt && prop == "LINK_LIBRARIES"_s;
}
- return prop == "LINK_LIBRARIES"_s || prop == "INTERFACE_LINK_LIBRARIES"_s ||
+ auto result = prop == "LINK_LIBRARIES"_s ||
+ prop == "INTERFACE_LINK_LIBRARIES"_s ||
prop == "INTERFACE_LINK_LIBRARIES_DIRECT"_s ||
- prop == "INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE"_s ||
prop == "LINK_INTERFACE_LIBRARIES"_s ||
prop == "IMPORTED_LINK_INTERFACE_LIBRARIES"_s ||
cmHasLiteralPrefix(prop, "LINK_INTERFACE_LIBRARIES_") ||
cmHasLiteralPrefix(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_");
+
+ return genex == ForGenex::LINK_LIBRARY || genex == ForGenex::LINK_GROUP
+ ? result
+ : (result || prop == "INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE"_s);
}
cmGeneratorExpressionDAGChecker const* cmGeneratorExpressionDAGChecker::Top()