Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ import class Foundation.ProcessInfo

let cmarkPackageName = ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil ? "swift-cmark" : "cmark"

// On non-Windows, do not include unsafe flags so SwiftPM allows tagged dependency usage.
var markdownSwiftSettings: [SwiftSetting] = []
#if os(Windows)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work, this restricts to building on windows, not for windows.

markdownSwiftSettings.append(
.unsafeFlags(["-Xcc", "-DCMARK_GFM_STATIC_DEFINE"], .when(platforms: [.windows]))
)
#endif

let package = Package(
name: "swift-markdown",
products: [
Expand All @@ -32,10 +40,8 @@ let package = Package(
exclude: [
"CMakeLists.txt"
],
swiftSettings: [
.unsafeFlags(["-Xcc", "-DCMARK_GFM_STATIC_DEFINE"],
.when(platforms: [.windows])),
]),
swiftSettings: markdownSwiftSettings
),
.testTarget(
name: "MarkdownTests",
dependencies: ["Markdown"],
Expand Down