Commit 8dc63ba9 by Jason Rhinelander

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
parent f3ce00ea
...@@ -128,6 +128,10 @@ pybind11_add_module(pybind11_tests THIN_LTO pybind11_tests.cpp ...@@ -128,6 +128,10 @@ pybind11_add_module(pybind11_tests THIN_LTO pybind11_tests.cpp
pybind11_enable_warnings(pybind11_tests) pybind11_enable_warnings(pybind11_tests)
if(MSVC)
target_compile_options(pybind11_tests PRIVATE /utf-8)
endif()
if(EIGEN3_FOUND) if(EIGEN3_FOUND)
if (PYBIND11_EIGEN_VIA_TARGET) if (PYBIND11_EIGEN_VIA_TARGET)
target_link_libraries(pybind11_tests PRIVATE Eigen3::Eigen) target_link_libraries(pybind11_tests PRIVATE Eigen3::Eigen)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment