Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/features/wasi-sdk/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"ghcr.io/devcontainers/features/common-utils": {}
},
"containerEnv": {
"WASI_SDK_ROOT": "/opt/wasi-sdk"
"WASI_SDK_PATH": "/opt/wasi-sdk"
}
}
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
endif()

set(CMAKE_CXX_SCAN_FOR_MODULES OFF)

FetchContent_Declare(
utfcpp
URL https://github.com/nemtrif/utfcpp/archive/refs/tags/v4.0.5.tar.gz
Expand Down
22 changes: 14 additions & 8 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_TOOLCHAIN_FILE": "$env{EMSCRIPTEN_ROOT}/cmake/Modules/Platform/Emscripten.cmake",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build.em/install/usr",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "YES",
"CXX_ENABLE_FLATBUFFERS": "NO",
Expand All @@ -50,16 +50,16 @@
"binaryDir": "${sourceDir}/build.wasi",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
"CMAKE_TOOLCHAIN_FILE": "$env{WASI_SDK_ROOT}/share/cmake/wasi-sdk.cmake",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_TOOLCHAIN_FILE": "$env{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake",
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build.wasi/install/usr",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "YES",
"CXX_ENABLE_FLATBUFFERS": "NO",
"CXX_INSTALL_WASI_SYSROOT": "YES"
},
"condition": {
"type": "notEquals",
"lhs": "$env{WASI_SDK_ROOT}",
"lhs": "$env{WASI_SDK_PATH}",
"rhs": ""
}
}
Expand All @@ -76,7 +76,9 @@
{
"name": "install",
"configurePreset": "default",
"targets": ["install"]
"targets": [
"install"
]
},
{
"name": "build-emscripten",
Expand All @@ -85,7 +87,9 @@
{
"name": "install-emscripten",
"configurePreset": "emscripten",
"targets": ["install"]
"targets": [
"install"
]
},
{
"name": "build-wasi",
Expand All @@ -94,7 +98,9 @@
{
"name": "install-wasi",
"configurePreset": "wasi",
"targets": ["install"]
"targets": [
"install"
]
}
],
"testPresets": [
Expand Down Expand Up @@ -168,4 +174,4 @@
]
}
]
}
}