Skip to content

Commit

Permalink
pass /utf-8 only when compiler is MSVC (#3260)
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanyan authored Nov 22, 2024
1 parent 1245bf8 commit 9edab1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ if(MSVC)
target_compile_options(spdlog PRIVATE "/Zc:__cplusplus")
target_compile_options(spdlog_header_only INTERFACE "/Zc:__cplusplus")
if(SPDLOG_MSVC_UTF8)
target_compile_options(spdlog PUBLIC "/utf-8")
target_compile_options(spdlog_header_only INTERFACE "/utf-8")
target_compile_options(spdlog PUBLIC $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
target_compile_options(spdlog_header_only INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
endif()
endif()

Expand Down

0 comments on commit 9edab1b

Please sign in to comment.