1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

CI: Sync configuration with 4.4 branch

Includes cherry-pick of warning fixes from 8d1462c748
and template builds unit tests fixes from 17929a3443.

Also a Windows MSVC detection fix for SCons 4.6.0+ from f682406cf2.
This commit is contained in:
Rémi Verschelde
2025-04-24 18:14:03 +02:00
parent c8fe093a3a
commit 02d383bf94
33 changed files with 461 additions and 293 deletions

View File

@@ -711,25 +711,30 @@ def detect_visual_c_compiler_version(tools_env):
def find_visual_c_batch_file(env):
from SCons.Tool.MSCommon.vc import (
get_default_version,
get_host_target,
find_batch_file,
)
# TODO: We should investigate if we can avoid relying on SCons internals here.
from SCons.Tool.MSCommon.vc import get_default_version, get_host_target, find_batch_file, find_vc_pdir
# Syntax changed in SCons 4.4.0.
from SCons import __version__ as scons_raw_version
scons_ver = env._get_major_minor_revision(scons_raw_version)
version = get_default_version(env)
msvc_version = get_default_version(env)
if scons_ver >= (4, 4, 0):
(host_platform, target_platform, _) = get_host_target(env, version)
(host_platform, target_platform, _) = get_host_target(env, msvc_version)
else:
(host_platform, target_platform, _) = get_host_target(env)
return find_batch_file(env, version, host_platform, target_platform)[0]
if scons_ver < (4, 6, 0):
return find_batch_file(env, msvc_version, host_platform, target_platform)[0]
# SCons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
# then pass that as the last param instead of env as the first param as before.
# Param names need to be explicit, as they were shuffled around in SCons 4.8.0.
product_dir = find_vc_pdir(msvc_version=msvc_version, env=env)
return find_batch_file(msvc_version, host_platform, target_platform, product_dir)[0]
def generate_cpp_hint_file(filename):