Skip to content

Commit 7a950e0

Browse files
committed
add /utf-8 flag for msvc
1 parent 9fe7969 commit 7a950e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ elseif(NOT CMAKE_CXX_STANDARD)
3333
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3434
endif()
3535

36-
# make sure __cplusplus is defined when using msvc and enable parallel build
36+
# under msvc make sure __cplusplus, parallel build and utf-8 enabled
3737
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
38-
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP")
38+
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus /MP /utf-8")
3939
endif()
4040

4141
set(CMAKE_CXX_EXTENSIONS OFF)

0 commit comments

Comments
 (0)