File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -77,3 +77,13 @@ let package = Package(
7777 dependencies: [ " TSCUtility " , " TSCTestSupport " ] ) ,
7878 ]
7979)
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
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