diff options
author | Copybara-Service <copybara-worker@google.com> | 2022-07-11 15:46:06 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-07-11 15:46:06 (GMT) |
commit | 8f01400b77506111a971860c373a66efb1855fdd (patch) | |
tree | 72f6718c44e307cf6207f557d5ea6952408c32c7 /googletest/cmake | |
parent | 4556086674e4dfae2aa5f042d9e7844fc5ef9b89 (diff) | |
parent | 6f3f9a9e617c0571356f74821944b13f54233f1c (diff) | |
download | googletest-8f01400b77506111a971860c373a66efb1855fdd.zip googletest-8f01400b77506111a971860c373a66efb1855fdd.tar.gz googletest-8f01400b77506111a971860c373a66efb1855fdd.tar.bz2 |
Merge pull request #3844 from akohlmey:intel-llvm-utf8-fix
PiperOrigin-RevId: 460222266
Change-Id: I2fbeac0b333ca16639f172ca1f23794ea9ddc2ad
Diffstat (limited to 'googletest/cmake')
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index a0aaa66..107147f 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -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. - set(cxx_base_flags "${cxx_base_flags} -utf-8") + 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") |