From 93b23ec9972f8c5fd90cbd37fdd755987b5e24b8 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 13 Oct 2021 15:40:49 -0400 Subject: [PATCH] web-wasi: Patch CMake with WASI platform WASI.cmake taken from the wasi-sdk repository. To address the build time warning: System is unknown to cmake, create: Platform/WASI to use this system, please post your config file on discourse.cmake.org so it can be added to cmake --- web-wasi/Dockerfile.in | 2 ++ web-wasi/Toolchain.cmake | 2 -- web-wasi/WASI.cmake | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 web-wasi/WASI.cmake diff --git a/web-wasi/Dockerfile.in b/web-wasi/Dockerfile.in index 3399f44..fa80be8 100644 --- a/web-wasi/Dockerfile.in +++ b/web-wasi/Dockerfile.in @@ -26,6 +26,8 @@ ENV AR=${CROSS_ROOT}/bin/llvm-ar \ CXX=clang++-wasi-sysroot.sh \ LD=${CROSS_ROOT}/bin/wasm-ld +COPY WASI.cmake /usr/src/ +RUN mv /usr/src/WASI.cmake /usr/share/cmake-*/Modules/Platform/ COPY Toolchain.cmake ${CROSS_ROOT}/ ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake diff --git a/web-wasi/Toolchain.cmake b/web-wasi/Toolchain.cmake index bd75c38..74f6395 100644 --- a/web-wasi/Toolchain.cmake +++ b/web-wasi/Toolchain.cmake @@ -1,5 +1,3 @@ -set(WASI 1) - include($ENV{WASI_SDK_PATH}/share/cmake/wasi-sdk.cmake) set(CMAKE_FIND_ROOT_PATH $ENV{CROSS_ROOT}) diff --git a/web-wasi/WASI.cmake b/web-wasi/WASI.cmake new file mode 100644 index 0000000..b49713f --- /dev/null +++ b/web-wasi/WASI.cmake @@ -0,0 +1 @@ +set(WASI 1)