Skip to content

Commit 24a70a8

Browse files
author
Judd
committed
fix utf-8 option for MSVC
1 parent 586e511 commit 24a70a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/build-info.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ endif()
4242
if(MSVC)
4343
set(BUILD_COMPILER "${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
4444
set(BUILD_TARGET ${CMAKE_VS_PLATFORM_NAME})
45-
add_compile_options("/utf-8")
45+
add_compile_options("$<$<COMPILE_LANGUAGE:C>:/utf-8>")
46+
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/utf-8>")
4647
else()
4748
execute_process(
4849
COMMAND sh -c "$@ --version | head -1" _ ${CMAKE_C_COMPILER}

0 commit comments

Comments
 (0)