[platform] msvc.cmake: Disable warning C4503.

'identifier': decorated name length exceeded, name was truncated

This is generated by RomHeaderTest due to the lots of tests.

NOTE: Only generated by MSVC 2015 and earlier. MSVC 2017 and later
don't emit this warning.

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4503?view=msvc-170
This commit is contained in:
David Korth 2025-04-01 03:25:40 -04:00
parent 778a49b632
commit 8b4b48a69c

View File

@ -13,6 +13,7 @@ ENDIF(NOT CMAKE_SYSTEM_VERSION)
# - C4005: macro redefinition (libpng's intprefix.out.tf1 is breaking on this...)
# - C4091: 'typedef ': ignored on left of 'tagGPFIDL_FLAGS' when no variable is declared
# - C4355: 'this' used in base member initializer list (used for Qt Dpointer pattern)
# - C4503: 'identifier': decorated name length exceeded, name was truncated (MSVC 2015 and earlier) [generated by RomHeaderTest]
# - C4800: 'BOOL': forcing value to bool 'true' or 'false' (performance warning)
# - MSVCRT "deprecated" functions
# - std::tr1 deprecation
@ -22,7 +23,7 @@ ENDIF(NOT CMAKE_SYSTEM_VERSION)
# - C4024: 'function': different types for formal and actual parameter n
# - C4047: 'function': 'parameter' differs in levels of indirection from 'argument'
# - C4477: 'function' : format string 'string' requires an argument of type 'type', but variadic argument number has type 'type'
SET(RP_C_FLAGS_COMMON "/nologo /W3 /WX /wd4005 /wd4091 /wd4355 /wd4800 /we4013 /we4024 /we4047 /we4477")
SET(RP_C_FLAGS_COMMON "/nologo /W3 /WX /wd4005 /wd4091 /wd4355 /wd4503 /wd4800 /we4013 /we4024 /we4047 /we4477")
SET(RP_CXX_FLAGS_COMMON "${RP_C_FLAGS_COMMON} -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS)
# NOTE: /TSAWARE is automatically set for Windows 2000 and later. (as of at least Visual Studio .NET 2003)