Skip to content

Commit c96906d

Browse files
cmake : set MSVC to use UTF-8 on source files (ggml-org#2346)
1 parent 9600fc3 commit c96906d

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
@@ -15,6 +15,11 @@ if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
1515
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
1616
endif()
1717

18+
# If MSVC set utf-8 encoding
19+
if (MSVC)
20+
add_compile_options(/utf-8)
21+
endif()
22+
1823
# Add path to modules
1924
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
2025

0 commit comments

Comments
 (0)