Skip to content

Commit 34271c3

Browse files
authored
Revert "build: add a shim for older CMake (#1664)" (#1690)
1 parent b5e75e1 commit 34271c3

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,8 @@ set(SWT_SOURCE_ROOT_DIR ${CMAKE_SOURCE_DIR})
2424
project(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-
3427
if(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)

cmake/modules/shared/CompilerSettings.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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")
4444
endif()
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")
4848
endif()
@@ -60,7 +60,7 @@ if(SWT_TESTING_LIBRARY_VERSION)
6060
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:SWT_TESTING_LIBRARY_VERSION=\"${SWT_TESTING_LIBRARY_VERSION}\">")
6161
endif()
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")
6666
endif()

0 commit comments

Comments
 (0)