소스 검색

SCons: Disable -Werror on 'stable' releases

Stable releases are tagged and need to stay easy to compile in the future.
As new compiler versions introduce new warnings or catch more occurrences,
have -Werror set in tagged releases could be a bother.

We still want it on by default for all Godot developers, so it's now
conditional.
Rémi Verschelde 5 년 전
부모
커밋
26ab805c78
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      SConstruct

+ 3 - 1
SConstruct

@@ -12,6 +12,7 @@ import sys
 # Local
 import methods
 import gles_builders
+import version
 from platform_methods import run_in_subprocess
 
 # Scan possible build platforms
@@ -72,6 +73,7 @@ env_base.disabled_modules = []
 env_base.use_ptrcall = False
 env_base.module_version_string = ""
 env_base.msvc = False
+env_base.stable_release = version.status == "stable"
 
 env_base.__class__.disable_module = methods.disable_module
 
@@ -126,7 +128,7 @@ opts.Add(BoolVariable("xaudio2", "Enable the XAudio2 audio driver", False))
 opts.Add(BoolVariable("verbose", "Enable verbose output for the compilation", False))
 opts.Add(BoolVariable("progress", "Show a progress indicator during compilation", True))
 opts.Add(EnumVariable("warnings", "Level of compilation warnings", "all", ("extra", "all", "moderate", "no")))
-opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", True))
+opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", not env_base.stable_release))
 opts.Add(BoolVariable("dev", "If yes, alias for verbose=yes warnings=extra werror=yes", False))
 opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files", "")
 opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False))