diff --git a/Package.swift b/Package.swift index 251b5acc..defda04b 100644 --- a/Package.swift +++ b/Package.swift @@ -27,10 +27,9 @@ swiftSettings.append( // Strict concurrency is enabled in CI; use this environment variable to enable it locally. if ProcessInfo.processInfo.environment["SWIFT_OPENAPI_STRICT_CONCURRENCY"].flatMap(Bool.init) ?? false { - #warning("Compiling with Strict Concurrency") swiftSettings.append(contentsOf: [ + .define("SWIFT_OPENAPI_STRICT_CONCURRENCY"), .enableExperimentalFeature("StrictConcurrency"), - .unsafeFlags(["-warnings-as-errors"]), ]) } #endif diff --git a/Sources/_OpenAPIGeneratorCore/PlatformChecks.swift b/Sources/_OpenAPIGeneratorCore/PlatformChecks.swift index 7b8cd14e..01bf66c4 100644 --- a/Sources/_OpenAPIGeneratorCore/PlatformChecks.swift +++ b/Sources/_OpenAPIGeneratorCore/PlatformChecks.swift @@ -17,3 +17,7 @@ #if !(os(macOS) || os(Linux)) #error("_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.") #endif + +#if SWIFT_OPENAPI_STRICT_CONCURRENCY +#warning("Compiling with Strict Concurrency") +#endif