From 8770bd97dc12ea2d28e45d42157534324a151032 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Tue, 24 Jun 2025 15:21:49 +0200 Subject: [PATCH] Made preprocessor with MSVC behave correctly. --- SConscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConscript b/SConscript index 64b8ab7..fe98247 100644 --- a/SConscript +++ b/SConscript @@ -1056,7 +1056,7 @@ elif env['COMPILER_FAMILY'] == 'cl': # C4251: missing dll-interface of some std types, yaml-cpp doesn't compile with this enabled # C4275: same as above env.Append(CCFLAGS = ['/W4', '/WX', '/wd4201', '/wd4127', '/wd4702', '/wd4251', '/wd4275', '/bigobj', '/vmg', - f'/std:{cxx_version_name}', '/permissive-', '/FS', '/Zc:char8_t', '/utf-8']) + f'/std:{cxx_version_name}', '/permissive-', '/FS', '/Zc:char8_t', '/utf-8', '/Zc:preprocessor']) env.Append(CPPDEFINES = ['_CRT_SECURE_NO_WARNINGS']) # I'd like to not use MSVC specific versions of functions because they are "safer" ... env.Append(DEPS_CXXFLAGS = ['/Zc:char8_t', '/utf-8', '/vmg']) if env['CXX_NO_EXCEPTIONS']: