File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,14 @@ let package = Package(
7777 dependencies: [ " TSCUtility " , " TSCTestSupport " ] ) ,
7878 ]
7979)
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
5757 # Ignore secure function warnings on Windows.
5858 "$<$<PLATFORM_ID:Windows>:SHELL:-Xcc -D_CRT_SECURE_NO_WARNINGS>" )
5959target_link_libraries (TSCBasic PUBLIC
60- TSCLibc)
60+ TSCLibc
61+ SwiftSystem)
6162target_link_libraries (TSCBasic PRIVATE
62- TSCclibc)
63+ TSCclibc)
6364if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
6465 if (Foundation_FOUND)
6566 target_link_libraries (TSCBasic PUBLIC
You can’t perform that action at this time.
0 commit comments