File tree 2 files changed +14
-2
lines changed 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,14 @@ let package = Package(
77
77
dependencies: [ " TSCUtility " , " TSCTestSupport " ] ) ,
78
78
]
79
79
)
80
+
81
+
82
+ // FIXME: conditionalise these flags since SwiftPM 5.3 and earlier will crash
83
+ // for platforms they don't know about.
84
+ #if os(Windows)
85
+ if let TSCBasic = package . targets. first ( where: { $0. name == " TSCBasic " } ) {
86
+ TSCBasic . cxxSettings = [
87
+ . define( " _CRT_SECURE_NO_WARNINGS " , . when( platforms: [ . windows] ) ) ,
88
+ ]
89
+ }
90
+ #endif
Original file line number Diff line number Diff line change @@ -57,9 +57,10 @@ target_compile_options(TSCBasic PUBLIC
57
57
# Ignore secure function warnings on Windows.
58
58
"$<$<PLATFORM_ID:Windows>:SHELL:-Xcc -D_CRT_SECURE_NO_WARNINGS>" )
59
59
target_link_libraries (TSCBasic PUBLIC
60
- TSCLibc)
60
+ TSCLibc
61
+ SwiftSystem)
61
62
target_link_libraries (TSCBasic PRIVATE
62
- TSCclibc)
63
+ TSCclibc)
63
64
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
64
65
if (Foundation_FOUND)
65
66
target_link_libraries (TSCBasic PUBLIC
You can’t perform that action at this time.
0 commit comments