Skip to content

Commit 8d2a34f

Browse files
committed
CMakeLists: config utf-8 for msvc
1 parent 544ebbb commit 8d2a34f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_CXX_EXTENSIONS OFF)
77

8+
# MSVC: Use UTF-8 source file encoding
9+
if(MSVC)
10+
add_compile_options(/utf-8)
11+
endif()
12+
813
# Cross-platform output directories
914
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
1015
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

0 commit comments

Comments
 (0)