Skip to content

Commit 50e5eef

Browse files
committed
change cmake /utf-8 option add mode
1 parent 6796ef2 commit 50e5eef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ else()
7474
include(cmake/conan_build.cmake)
7575
endif()
7676

77-
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
78-
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
79-
8077
#############################################################
8178
# LIBRARY
8279

@@ -189,6 +186,7 @@ target_compile_definitions(${BTCPP_LIBRARY} PUBLIC BTCPP_LIBRARY_VERSION="${CMAK
189186
target_compile_features(${BTCPP_LIBRARY} PUBLIC cxx_std_17)
190187

191188
if(MSVC)
189+
target_compile_options(${BTCPP_LIBRARY} PRIVATE "/source-charset:utf-8")
192190
else()
193191
target_compile_options(${BTCPP_LIBRARY} PRIVATE -Wall -Wextra)
194192
endif()

0 commit comments

Comments
 (0)