From beea2e587fe97b8ce0648ab8923d77f4fb938ffa Mon Sep 17 00:00:00 2001 From: Samuel Nicholas Date: Wed, 15 Jan 2025 20:08:30 +1030 Subject: [PATCH] Add /utf-8 to MSVC builds of the test project --- test/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8b7d7251..41c03d7b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -77,6 +77,14 @@ foreach( TARGET_ALIAS template_debug template_release editor ) FOLDER "godot-cpp" ) + target_compile_options( ${TARGET_NAME} + PRIVATE + # The test project uses utf-8 characters in its source files: + # example.h:282.283, and example.cpp:774,8775,778 + # which require interpretation of source files as utf-8 by MSVC + $<${IS_MSVC}:/utf-8> + ) + # Only blank the suffix on osx to match SCons if( CMAKE_SYSTEM_NAME STREQUAL Darwin ) set_target_properties( ${TARGET_NAME}