修正Visual Studio 编译器的 PDB 文件锁冲突

(cherry picked from commit 62ab152d639509119db5edd742765bd3bec575bc)
This commit is contained in:
Rust 2025-10-29 15:40:47 +08:00 committed by speakeloudest
parent 1970bbb6fd
commit 0067017ca6

View File

@ -11,6 +11,8 @@ set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} /MT")
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4819 /wd4244 /wd4458")
# /FS PDB 访 C1041
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FS")
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
@ -50,7 +52,7 @@ add_definitions(-DUNICODE -D_UNICODE)
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100" /wd"4819" /wd"4244" /wd"4458")
target_compile_options(${TARGET} PRIVATE /EHsc /utf-8)
target_compile_options(${TARGET} PRIVATE /EHsc /utf-8 /FS)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
# 使