debug libraries

This commit is contained in:
Dylan Conway
2024-09-12 21:24:10 -07:00
parent e5e8861fde
commit 3c0327df3a
3 changed files with 16 additions and 4 deletions

View File

@@ -50,7 +50,6 @@ endif()
if(DEBUG)
register_compiler_flags(
DESCRIPTION "Disable optimization"
/O0 ${WIN32}
-O0 ${UNIX}
)
elseif(ENABLE_SMOL)

View File

@@ -28,7 +28,11 @@ if(ENABLE_VALGRIND)
endif()
if(WIN32)
set(MIMALLOC_LIBRARY mimalloc-static)
if(DEBUG)
set(MIMALLOC_LIBRARY mimalloc-static-debug)
else()
set(MIMALLOC_LIBRARY mimalloc-static)
endif()
elseif(DEBUG)
set(MIMALLOC_LIBRARY mimalloc-debug)
else()

View File

@@ -13,6 +13,16 @@ if(APPLE)
set(ZLIB_CMAKE_CXX_FLAGS "-fno-define-target-os-macros")
endif()
if(WIN32)
if(DEBUG)
set(ZLIB_LIBRARY "zlibd")
else()
set(ZLIB_LIBRARY "zlib")
endif()
else()
set(ZLIB_LIBRARY "z")
endif()
register_cmake_command(
TARGET
zlib
@@ -24,8 +34,7 @@ register_cmake_command(
"-DCMAKE_C_FLAGS=${ZLIB_CMAKE_C_FLAGS}"
"-DCMAKE_CXX_FLAGS=${ZLIB_CMAKE_CXX_FLAGS}"
LIBRARIES
zlib WIN32
z UNIX
${ZLIB_LIBRARY}
INCLUDES
.
)