cmExportFileGenerator: export link libraries as-is

This allows for transitive modules to work because
`$<COMPILE_ONLY>`-wrapped dependencies do not end up in the
`linked-target-dirs` collator property. Test suite exported property
tests updated to account for the change.
This commit is contained in:
Ben Boeckel
2024-02-20 07:38:58 -05:00
parent a2e3e61a31
commit 67466ddf65
5 changed files with 5 additions and 9 deletions
+1 -5
View File
@@ -1360,11 +1360,7 @@ bool cmExportFileGenerator::PopulateCxxModuleExportProperties(
auto value = cmGeneratorExpression::Preprocess(*prop, ctx);
this->ResolveTargetsInGeneratorExpressions(
value, gte, cmExportFileGenerator::ReplaceFreeTargets);
std::vector<std::string> wrappedValues;
for (auto& item : cmList{ value }) {
wrappedValues.push_back(cmStrCat("$<COMPILE_ONLY:", item, '>'));
}
properties[exportedPropName] = cmJoin(wrappedValues, ";");
properties[exportedPropName] = value;
}
}