mingw:编译选项添加。

This commit is contained in:
taynpg 2025-01-05 21:58:45 +08:00
parent 4f7c6f9774
commit c80628cebf

View File

@ -7,6 +7,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (MSVC)
add_compile_options(/source-charset:utf-8)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
MESSAGE(STATUS "Add MinGW Param.")
add_compile_options(-finput-charset=utf-8)
add_compile_options(-fexec-charset=gbk)
endif()
message(STATUS "System: ${CMAKE_SYSTEM_NAME}")
message(STATUS "Compiler CXX ID: ${CMAKE_CXX_COMPILER_ID}")