Skip to content

Commit

Permalink
Specify the source character set for MSVC.
Browse files Browse the repository at this point in the history
Change-Id: Ifdefb605b2a61cda57e4aac09bccccc9ab8fdb16
Reviewed-on: https://code-review.googlesource.com/21430
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Dec 19, 2017
1 parent c7e077f commit 382394a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# CMake defaults to /W3, but some users like /W4 (or /Wall) and /WX,
# so we disable various warnings that aren't particularly helpful.
add_compile_options(/wd4100 /wd4201 /wd4456 /wd4457 /wd4702 /wd4815)
# Without a byte order mark (BOM), Visual Studio assumes that the source
# file is encoded using the current user code page, so we specify UTF-8.
add_compile_options(/source-charset:utf-8)
elseif(CYGWIN OR MINGW)
# See https://stackoverflow.com/questions/38139631 for details.
add_compile_options(-std=gnu++11)
Expand Down

0 comments on commit 382394a

Please sign in to comment.