mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Force MSVC to compile in utf-8 mode
MSVC by default uses the local codepage, which fails when it sees the utf-8 in test_python_types.cpp. This adds the /utf-8 flag to the test suite compilation to force it to interpret source code as utf-8. Fixes #869
This commit is contained in:
parent
f3ce00eaed
commit
8dc63ba941
@ -128,6 +128,10 @@ pybind11_add_module(pybind11_tests THIN_LTO pybind11_tests.cpp
|
||||
|
||||
pybind11_enable_warnings(pybind11_tests)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(pybind11_tests PRIVATE /utf-8)
|
||||
endif()
|
||||
|
||||
if(EIGEN3_FOUND)
|
||||
if (PYBIND11_EIGEN_VIA_TARGET)
|
||||
target_link_libraries(pybind11_tests PRIVATE Eigen3::Eigen)
|
||||
|
Loading…
Reference in New Issue
Block a user