mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 05:53:59 -07:00
take 2
This commit is contained in:
parent
acf2322ff2
commit
dda12bb172
1 changed files with 8 additions and 2 deletions
|
|
@ -143,9 +143,15 @@ endif()
|
|||
|
||||
# Define proper compilation flags
|
||||
if(MSVC)
|
||||
# /Z7 when using compiler launcher (sccache): avoids C1041 PDB lock with parallel cached compiles
|
||||
# /Zi /FS otherwise for Ninja + /MP parallel builds
|
||||
if(CMAKE_CXX_COMPILER_LAUNCHER)
|
||||
set(_msvc_debug_format " /Z7")
|
||||
else()
|
||||
set(_msvc_debug_format " /Zi /FS")
|
||||
endif()
|
||||
# Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics, Debug Symbols
|
||||
# /FS: Allow concurrent PDB writes (required for Ninja + /MP parallel builds)
|
||||
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc /Zi /FS")
|
||||
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc${_msvc_debug_format}")
|
||||
# Visual Studio: Maximum Optimization, Multi-threaded DLL
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD")
|
||||
# Visual Studio: No Optimization, Multi-threaded Debug DLL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue