From a350071e7f6d48ee086ef49721196cf41b9006ec Mon Sep 17 00:00:00 2001 From: Rick Newton-Rogers Date: Tue, 26 Nov 2024 13:38:23 +0000 Subject: [PATCH] Cxx interop CI appends swiftSettings Cxx interop CI appends `swiftSettings` to any existing settings rather than overriding them. This better accommodates workflows for example which use Swift 5 language mode on a per-target basis. --- scripts/check-cxx-interop-compatibility.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-cxx-interop-compatibility.sh b/scripts/check-cxx-interop-compatibility.sh index 5ad33a609c0..9e868e94b5d 100755 --- a/scripts/check-cxx-interop-compatibility.sh +++ b/scripts/check-cxx-interop-compatibility.sh @@ -33,7 +33,7 @@ swift package init { echo "let swiftSettings: [SwiftSetting] = [.interoperabilityMode(.Cxx)]" - echo "for target in package.targets { target.swiftSettings = swiftSettings }" + echo "for target in package.targets { target.swiftSettings = (target.swiftSettings ?? []) + swiftSettings }" } >> Package.swift echo "package.dependencies.append(.package(path: \"$source_dir\"))" >> Package.swift