diff --git a/test/common.py b/test/common.py index 1f428f70add7a..7a7ce0949fad0 100644 --- a/test/common.py +++ b/test/common.py @@ -1540,7 +1540,7 @@ def build_library(name, # cross compiling. if configure: if configure[0] == 'cmake': - configure = [EMCMAKE] + configure + configure = [EMCMAKE '-DCMAKE_POLICY_VERSION_MINIMUM=3.5'] + configure else: configure = [EMCONFIGURE] + configure else: diff --git a/test/test_other.py b/test/test_other.py index 8071cf2d4f875..6a89af3d62303 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -931,7 +931,7 @@ 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] + 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.