| 3865 | } sourcePropertyNode; |
| 3866 | |
| 3867 | static std::string getLinkedTargetsContent( |
| 3868 | cmGeneratorTarget const* target, std::string const& prop, |
| 3869 | cm::GenEx::Evaluation* eval, cmGeneratorExpressionDAGChecker* dagChecker, |
| 3870 | cmGeneratorTarget::UseTo usage) |
| 3871 | { |
| 3872 | std::string result; |
| 3873 | if (cmLinkImplementationLibraries const* impl = |
| 3874 | target->GetLinkImplementationLibraries( |
| 3875 | eval->Context.Config, cmGeneratorTarget::UseTo::Compile)) { |
| 3876 | for (cmLinkItem const& lib : impl->Libraries) { |
| 3877 | if (lib.Target) { |
| 3878 | // Pretend $<TARGET_PROPERTY:lib.Target,prop> appeared in our |
| 3879 | // caller's property and hand-evaluate it as if it were compiled. |
| 3880 | // Create a context as cmCompiledGeneratorExpression::Evaluate does. |
| 3881 | cm::GenEx::Context libContext(eval->Context); |
| 3882 | // FIXME: Why have we long used the target's local generator |
| 3883 | // instead of that of the evaluation context? |
| 3884 | libContext.LG = target->GetLocalGenerator(); |
| 3885 | cm::GenEx::Evaluation libEval( |
| 3886 | std::move(libContext), eval->Quiet, target, target, |
| 3887 | eval->EvaluateForBuildsystem, lib.Backtrace); |
| 3888 | std::string libResult = lib.Target->EvaluateInterfaceProperty( |
| 3889 | prop, &libEval, dagChecker, usage); |
| 3890 | if (!libResult.empty()) { |
| 3891 | if (result.empty()) { |
| 3892 | result = std::move(libResult); |
| 3893 | } else { |
| 3894 | result.reserve(result.size() + 1 + libResult.size()); |
| 3895 | result += ";"; |
| 3896 | result += libResult; |
| 3897 | } |
| 3898 | } |
| 3899 | } |
| 3900 | } |
| 3901 | } |
| 3902 | return result; |
| 3903 | } |
| 3904 | |
| 3905 | static const struct TargetPropertyNode : public cmGeneratorExpressionNode |
| 3906 | { |
no test coverage detected
searching dependent graphs…