Skip to content

Commit 38558e6

Browse files
committed
Optimize OpenAttributeGraphCompatibilityTests
1 parent 462e8ef commit 38558e6

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ if libraryEvolutionCondition {
212212
// Either set OPENATTRIBUTEGRAPH_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
213213
sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution", "-no-verify-emitted-module-interface"]))
214214
}
215-
if !compatibilityTestCondition {
215+
if !(compatibilityTestCondition && buildForDarwinPlatform) {
216216
sharedCSettings.append(.define("OPENATTRIBUTEGRAPH"))
217217
sharedCxxSettings.append(.define("OPENATTRIBUTEGRAPH"))
218218
sharedSwiftSettings.append(.define("OPENATTRIBUTEGRAPH"))
@@ -358,7 +358,7 @@ let openAttributeGraphCompatibilityTestsTarget = Target.testTarget(
358358
name: "OpenAttributeGraphCompatibilityTests",
359359
dependencies: [
360360
.product(name: "Numerics", package: "swift-numerics"),
361-
] + (compatibilityTestCondition ? [] : [.target(name: openAttributeGraphTarget.name)]),
361+
],
362362
exclude: ["README.md"],
363363
cSettings: sharedCSettings,
364364
cxxSettings: sharedCxxSettings,
@@ -468,6 +468,9 @@ if computeCondition {
468468
)
469469
if compatibilityTestCondition, buildForDarwinPlatform {
470470
setupDPFDependency()
471+
openAttributeGraphCompatibilityTestsTarget.dependencies.append(
472+
.target(name: openAttributeGraphTarget.name)
473+
)
471474
openAttributeGraphCompatibilityTestsTarget.addAGSettings()
472475
} else {
473476
package.targets += [

0 commit comments

Comments
 (0)