Răsfoiți Sursa

enabled debug information in MSVC release build

No effect on runtime speed/size. Slightly slower link time, but debugging experience improves by a million times.

- /Zi – Store debug information in a .pdb file, not directly in the DLL/EXE
- /DEBUG:FULL – generate debug information during link
- /PDBALTPATH:%_PDB% – do not store the file system path of the .pdb, just the filename and hash (no disclose paths on distribution)
- /OPT:REF /OPT:ICF – remove unreferenced functions and fold identical functions (this was enabled before, but requires explicit enabling if /DEBUG:FULL is specified)
Krishty 4 ani în urmă
părinte
comite
8ad9c937f1
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -268,6 +268,8 @@ ELSEIF(MSVC)
     ADD_COMPILE_OPTIONS(/wd4351)
   ENDIF()
   SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
+  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
+  SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")
 ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
   IF(NOT ASSIMP_HUNTER_ENABLED)
     SET(CMAKE_CXX_STANDARD 11)