Made preprocessor with MSVC behave correctly.

This commit is contained in:
Patrick 2025-06-24 15:21:49 +02:00
parent 68f20bcf2d
commit 8770bd97dc

View File

@ -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 # C4251: missing dll-interface of some std types, yaml-cpp doesn't compile with this enabled
# C4275: same as above # C4275: same as above
env.Append(CCFLAGS = ['/W4', '/WX', '/wd4201', '/wd4127', '/wd4702', '/wd4251', '/wd4275', '/bigobj', '/vmg', 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(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']) env.Append(DEPS_CXXFLAGS = ['/Zc:char8_t', '/utf-8', '/vmg'])
if env['CXX_NO_EXCEPTIONS']: if env['CXX_NO_EXCEPTIONS']: