CMake 4.0 removes compatibility for CMake versions below 3.5. The version of WASI SDK that StarlingMonkey depends on erroneously declares a cmake_minimum_required of 3.4 in its toolchain file, which as far as I can tell is not affected by the CMAKE_POLICY_VERSION_MINIMUM escape hatch. As such, configuring StarlingMonkey with CMake 4.0 results in the following:
CMake Error at /home/tartanllama/.vs/StarlingMonkey/deps/cpm_cache/wasi-sdk/eb15b745329e65e3454079782694377bbd7768bb/wasi-sdk/share/cmake/wasi-sdk.cmake:4 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
This was fixed in WebAssembly/wasi-sdk#412, so merging #189 would fix the issue. In the mean time, as a work around, it suffices to manually edit those lines after CPM pulls in WASI-SDK, or automate this process in cmake/wasi-sdk.cmake
CMake 4.0 removes compatibility for CMake versions below 3.5. The version of WASI SDK that StarlingMonkey depends on erroneously declares a
cmake_minimum_requiredof 3.4 in its toolchain file, which as far as I can tell is not affected by theCMAKE_POLICY_VERSION_MINIMUMescape hatch. As such, configuring StarlingMonkey with CMake 4.0 results in the following:This was fixed in WebAssembly/wasi-sdk#412, so merging #189 would fix the issue. In the mean time, as a work around, it suffices to manually edit those lines after CPM pulls in WASI-SDK, or automate this process in
cmake/wasi-sdk.cmake