Skip to content

Commit

Permalink
Add /utf-8 option for MSVC to lexy_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
shohirose authored and foonathan committed Nov 15, 2023
1 parent c520cbf commit 8b39b2f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# GCC's arry bounds, maybe uninitialized, and restrict warning seems to have false positives.
target_compile_options(lexy_dev INTERFACE -Wno-array-bounds -Wno-maybe-uninitialized -Wno-restrict)
elseif(MSVC)
target_compile_options(lexy_dev INTERFACE /WX /W3 /D _CRT_SECURE_NO_WARNINGS /wd5105)
target_compile_options(lexy_dev INTERFACE /WX /W3 /D _CRT_SECURE_NO_WARNINGS /wd5105 /utf-8)
endif()

# Link to have FILE I/O.
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ target_compile_definitions(lexy_test_base PUBLIC LEXY_TEST)
if(MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
target_compile_options(lexy_test_base PUBLIC
/Zc:preprocessor # need a conforming preprocessor for stringifying escape characters
"/utf-8" # use utf-8 instead of current code page
/bigobj # some of the object files are really big for some reason
)
endif()
Expand Down

0 comments on commit 8b39b2f

Please sign in to comment.