cmake : set MSVC to use UTF-8 on source files (#2346)

This commit is contained in:
Tim Miller 2024-08-30 20:04:04 +09:00 committed by GitHub
parent 9600fc3eb1
commit c96906d84d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,11 @@ if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
# If MSVC set utf-8 encoding
if (MSVC)
add_compile_options(/utf-8)
endif()
# Add path to modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")