From 2131e7a9414bb225807605a8140c7435db11c370 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sat, 5 Oct 2024 19:17:38 +0100 Subject: [PATCH] Fix Windows builds with Godot 4.3 --- thirdparty/fast_noise_2/SConscript | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/thirdparty/fast_noise_2/SConscript b/thirdparty/fast_noise_2/SConscript index b2e76d54f..d5b853513 100644 --- a/thirdparty/fast_noise_2/SConscript +++ b/thirdparty/fast_noise_2/SConscript @@ -55,8 +55,11 @@ env_fn2 = env_voxel.Clone() # Note: when compiling with clang-cl on Windows, `env.msvc` is still True because clang-cl behaves like an MSVC # frontend. However, Clang is more picky and generates more warnings, so we use Clang options anyways. if env.msvc and not env["use_llvm"]: - # Avoid a compiler bug in VS 2022 (doesn't occur in VS 2019) - env_fn2['CCFLAGS'].remove('/permissive-') + # Avoid a compiler bug in VS 2022 (doesn't occur in VS 2019). + # Check for existence because it was added in Godot 4.4 and currently we also support 4.3 + # https://github.com/Zylann/godot/commit/807904d9515e9d2aaf16f6260945a6632689f1b9 + if '/permissive-' in env_fn2['CCFLAGS']: + env_fn2['CCFLAGS'].remove('/permissive-') # In some places, integral constants are multiplied but cause overflow (ex: Simplex.inl(432) in 0.10.0-alpha). # This is usually expected by the devs though. env_fn2.Append(CXXFLAGS=["/wd4307"])