File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,15 +24,8 @@ set(SWT_SOURCE_ROOT_DIR ${CMAKE_SOURCE_DIR})
2424project (SwiftTesting
2525 LANGUAGES CXX Swift )
2626
27- if (CMAKE_VERSION VERSION_LESS 3.31)
28- if (CMAKE_SYSTEM_NAME STREQUAL "Generic" AND CMAKE_SYSTEM_PROCESSOR MATCHES "wasm32" )
29- set (CMAKE_SYSTEM_NAME WASI)
30- set (WASI 1)
31- endif ()
32- endif ()
33-
3427if (NOT APPLE )
35- if (NOT WASI)
28+ if (NOT CMAKE_SYSTEM_NAME STREQUAL WASI)
3629 find_package (dispatch CONFIG )
3730 endif ()
3831 find_package (Foundation CONFIG )
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ if(NOT APPLE)
4242 add_compile_definitions ("SWT_NO_SNAPSHOT_TYPES" )
4343 add_compile_definitions ("SWT_NO_FOUNDATION_FILE_COORDINATION" )
4444endif ()
45- if (WASI)
45+ if (CMAKE_SYSTEM_NAME STREQUAL " WASI" )
4646 add_compile_definitions ("SWT_NO_DYNAMIC_LINKING" )
4747 add_compile_definitions ("SWT_NO_PIPES" )
4848endif ()
@@ -60,7 +60,7 @@ if(SWT_TESTING_LIBRARY_VERSION)
6060 add_compile_definitions ("$<$<COMPILE_LANGUAGE :CXX >:SWT_TESTING_LIBRARY_VERSION =\"${SWT_TESTING_LIBRARY_VERSION} \">" )
6161endif ()
6262
63- if ((NOT BUILD_SHARED_LIBS ) AND NOT WASI)
63+ if ((NOT BUILD_SHARED_LIBS ) AND ( NOT CMAKE_SYSTEM_NAME STREQUAL WASI) )
6464 # When building a static library, Interop is not supported at this time
6565 add_compile_definitions ("SWT_NO_INTEROP" )
6666endif ()
You can’t perform that action at this time.
0 commit comments