From 8f7ad824dce1dee29c405af6d4d82396f2863c00 Mon Sep 17 00:00:00 2001 From: Eric Mehl Date: Tue, 19 Dec 2023 10:20:48 -0500 Subject: [PATCH] Build : Set `MSVC_VERSION` SCons will use the latest installed MSVC version by default. We are currently using MSVC 2019 (or for this purpose, toolset 14.2, see https://devblogs.microsoft.com/oldnewthing/20221219-00/?p=107601 for a valiant attempt at explaining MSVC version numbering) so building with a newer compiler installed will fail with "unexpected compiler version" errors. This mismatch will go away when we update to MSVC 2022, but will almost certainly come up again, so it's worth codifying the version we use. --- SConstruct | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SConstruct b/SConstruct index c459dd538ba..94cf3e568c5 100644 --- a/SConstruct +++ b/SConstruct @@ -376,6 +376,8 @@ options.Add( "GAFFER_VERSION_SUFFIX", "Version suffix", str( gafferVersionSuffix env = Environment( + MSVC_VERSION = "14.2", + options = options, CPPDEFINES = [