Merge pull request #3844 from akohlmey:intel-llvm-utf8-fix

PiperOrigin-RevId: 460222266
Change-Id: I2fbeac0b333ca16639f172ca1f23794ea9ddc2ad
This commit is contained in:
Copybara-Service 2022-07-11 08:46:06 -07:00
commit 8f01400b77

View File

@ -82,7 +82,9 @@ macro(config_compiler_and_linker)
# http://stackoverflow.com/questions/3232669 explains the issue.
set(cxx_base_flags "${cxx_base_flags} -wd4702")
# Ensure MSVC treats source files as UTF-8 encoded.
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(cxx_base_flags "${cxx_base_flags} -utf-8")
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(cxx_base_flags "-Wall -Wshadow -Wconversion")
set(cxx_exception_flags "-fexceptions")