build(msvc): always assume source files are in UTF-8

Fixes https://github.com/ARMmbed/mbedtls/issues/4205

Signed-off-by: Andrea Pappacoda <andrea@pappacoda.it>
(cherry picked from commit 9202909d071e708770fc61437d11e3a9be2b04b9)
This commit is contained in:
Andrea Pappacoda 2021-12-27 22:41:21 +01:00
parent 1eba24a6ce
commit 24f20af0cd
No known key found for this signature in database
GPG Key ID: A8A128A8AB1CEE49
2 changed files with 4 additions and 2 deletions

View File

@ -226,8 +226,8 @@ if(CMAKE_COMPILER_IS_IAR)
endif(CMAKE_COMPILER_IS_IAR)
if(CMAKE_COMPILER_IS_MSVC)
# Strictest warnings
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
# Strictest warnings, UTF-8 source and execution charset
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /utf-8")
endif(CMAKE_COMPILER_IS_MSVC)
if(MBEDTLS_FATAL_WARNINGS)

View File

@ -0,0 +1,2 @@
Changes
* Assume source files are in UTF-8 when using MSVC with CMake.