From c2f0ab5c937f1c9ef2a53fdea6c9a3b73ab544d3 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Mon, 14 Apr 2025 12:56:53 +0200 Subject: [PATCH] chore(emscripten): Fix github CMake build --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bb5a9657..443e3f40e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -224,7 +224,20 @@ jobs: steps: - uses: actions/checkout@v4 - run: sudo apt -y update && sudo apt -y install cmake ninja-build emscripten - - run: emcmake cmake -H. -B cmake-build -DENABLE_ACTIVERECORD_COMPILER=OFF -DENABLE_PAGECOMPILER=OFF -DENABLE_PAGECOMPILER_FILE2PAGE=off && emmake cmake --build cmake-build --target all -j6 + +# +# Option "-DCMAKE_POLICY_VERSION_MINIMUM=3.5" is added to resolve the following issue. +# +# CMake Error at /usr/share/emscripten/cmake/Modules/CheckTypeSize.cmake:85 (cmake_policy): +# Compatibility with CMake < 3.5 has been removed from CMake. +# +# Update the VERSION argument value. Or, use the ... syntax +# to tell CMake that the project requires at least but has been updated +# to work with policies introduced by or earlier. +# +# Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. + + - run: emcmake cmake -H. -B cmake-build -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DENABLE_ACTIVERECORD_COMPILER=OFF -DENABLE_PAGECOMPILER=OFF -DENABLE_PAGECOMPILER_FILE2PAGE=off && emmake cmake --build cmake-build --target all -j6 # TODO: How to run unit tests in emscripten? # - uses: ./.github/actions/retry-action # with: