Skip to content

Commit

Permalink
Cxx interop CI appends swiftSettings (#3002)
Browse files Browse the repository at this point in the history
Cxx interop CI appends `swiftSettings` to any existing settings rather
than overriding them.

### Motivation:

This better accommodates workflows for example which use Swift 5
language mode on a per-target basis.

### Modifications:
Cxx interop CI appends `swiftSettings` to any existing settings rather
than overriding them.

### Result:

Cxx interop CI jobs don't cause unexpected build configurations.
  • Loading branch information
rnro authored Nov 26, 2024
1 parent 4d2fb57 commit d2cc4d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/check-cxx-interop-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2cc4d7

Please sign in to comment.