SCons: Fix MSVC bypassing disabled warnings

This commit is contained in:
Thaddeus Crews
2024-12-08 15:58:14 -06:00
parent aa8d9b83f6
commit 070aeb5688
7 changed files with 55 additions and 67 deletions

View File

@ -31,17 +31,22 @@ thirdparty_sources = [
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_csg.Prepend(
CPPPATH=[
thirdparty_dir + "include",
]
)
env_csg.Prepend(CPPPATH=[thirdparty_dir + "include"])
env_thirdparty = env_csg.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env.modules_sources += thirdparty_obj
# Godot's own source files
env_csg.add_source_files(env.modules_sources, "*.cpp")
# Godot source files
module_obj = []
env_csg.add_source_files(module_obj, "*.cpp")
if env.editor_build:
env_csg.add_source_files(env.modules_sources, "editor/*.cpp")
env_csg.add_source_files(module_obj, "editor/*.cpp")
env.modules_sources += module_obj
# Needed to force rebuilding the module files when the thirdparty library is updated.
env.Depends(module_obj, thirdparty_obj)