-
Since you force /DEBUG for the linker in release it generates PDBs which is great. It, however, ALSO disables /OPT:REF,ICF so you should be adding that back in.
-
The linker should use /CETCOMPAT for CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27
-
Compiler switch /guard:cf needs to be on for release
-
Compiler and linker should use /guard:ehcont for MSVC_VERSION GREATER_EQUAL 1928
-
Linker for release should use /INCREMENTAL:NO
-
The release build is missing /GF so it doesn't remove duplicate strings. Was this intentional?
See https://github.com/walbourn/directx-vs-templates/blob/main/build/CompilerAndLinker.cmake for a full set of switches and compiler versions.
Since you force
/DEBUGfor the linker in release it generates PDBs which is great. It, however, ALSO disables/OPT:REF,ICFso you should be adding that back in.The linker should use
/CETCOMPATfor CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27Compiler switch
/guard:cfneeds to be on for releaseCompiler and linker should use
/guard:ehcontfor MSVC_VERSION GREATER_EQUAL 1928Linker for release should use
/INCREMENTAL:NOThe release build is missing
/GFso it doesn't remove duplicate strings. Was this intentional?See https://github.com/walbourn/directx-vs-templates/blob/main/build/CompilerAndLinker.cmake for a full set of switches and compiler versions.