File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,13 @@ let package = Package(
77
77
dependencies: [ " TSCUtility " , " TSCTestSupport " ] ) ,
78
78
]
79
79
)
80
+
81
+ // FIXME: conditionalise these flags since SwiftPM 5.3 and earlier will crash
82
+ // for platforms they don't know about.
83
+ #if os(Windows)
84
+ if let TSCBasic = package . targets. first ( where: { $0. name == " TSCBasic " } ) {
85
+ TSCBasic . cxxSettings = [
86
+ . define( " _CRT_SECURE_NO_WARNINGS " , . when( platforms: [ . windows] ) ) ,
87
+ ]
88
+ }
89
+ #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