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
4 changes: 3 additions & 1 deletion test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,9 @@ def build_library(self, name, build_dir, generated_libs, configure, make, make_a
# cross compiling.
if configure:
if configure[0] == 'cmake':
configure = [EMCMAKE] + configure
# Some tests have very old cmake_minimum_version settings which is not supported by cmake 4+.
# Forcing a slighly more recent cmake_minimum_version works around this issue.
configure = [EMCMAKE] + configure + ['-DCMAKE_POLICY_VERSION_MINIMUM=3.5']
else:
configure = [EMCONFIGURE] + configure
else:
Expand Down
5 changes: 4 additions & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,10 @@ def test_cmake(self, test_dir, output_file, cmake_args):
os.mkdir(builddir)
with common.chdir(builddir):
# Run Cmake
cmd = [EMCMAKE, 'cmake'] + cmake_args + ['-G', generator, cmakelistsdir]

# Some tests have very old cmake_minimum_version settings which is not supported by cmake 4+.
# Forcing a slighly more recent cmake_minimum_version works around this issue.
cmd = [EMCMAKE, 'cmake'] + cmake_args + ['-G', generator, cmakelistsdir, '-DCMAKE_POLICY_VERSION_MINIMUM=3.5']

env = os.environ.copy()
# https://github.com/emscripten-core/emscripten/pull/5145: Check that CMake works even if EMCC_SKIP_SANITY_CHECK=1 is passed.
Expand Down