Skip to content

Commit

Permalink
Workaround a compiler bug in VS2022 that prevents building FastNoise2
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Oct 5, 2024
1 parent ce0aaab commit b440069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thirdparty/fast_noise_2/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ 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-')
# 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"])

else:
# We compile with `-Wall`, but FastNoise2 does not, so a lot of pedantic things show up treated as errors
env_fn2.Append(CXXFLAGS=["-Wno-parentheses"])
Expand Down

0 comments on commit b440069

Please sign in to comment.