mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
namespace {
|
||||
using UseTo = cmGeneratorTarget::UseTo;
|
||||
using TransitiveProperty = cmGeneratorTarget::TransitiveProperty;
|
||||
|
||||
bool ComputingLinkLibraries(cmGeneratorExpressionDAGChecker const* dagChecker)
|
||||
{
|
||||
return dagChecker && dagChecker->IsComputingLinkLibraries();
|
||||
}
|
||||
}
|
||||
|
||||
std::map<cm::string_view, TransitiveProperty> const
|
||||
@@ -206,7 +211,7 @@ cmGeneratorTarget::IsTransitiveProperty(
|
||||
result->Usage = cmGeneratorTarget::UseTo::Compile;
|
||||
}
|
||||
}
|
||||
} else if (!dagChecker || !dagChecker->IsComputingLinkLibraries()) {
|
||||
} else if (!ComputingLinkLibraries(dagChecker)) {
|
||||
// Honor TRANSITIVE_COMPILE_PROPERTIES and TRANSITIVE_LINK_PROPERTIES
|
||||
// from the link closure when we are not evaluating the closure itself.
|
||||
CustomTransitiveProperties const& ctp =
|
||||
|
Reference in New Issue
Block a user