1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-16 07:07:13 +02:00

Allow for debug builds with debug information.

This commit is contained in:
Sandu Liviu Catalin
2020-04-30 21:34:10 +03:00
parent b93deee276
commit 69e8a9377c
5 changed files with 23 additions and 2 deletions

View File

@ -90,6 +90,12 @@ if(ENABLE_MYSQL)
target_link_libraries(SqModule MySQL::MySQL)
endif()
endif()
# Determine if build mode
if(CMAKE_BUILD_TYPE MATCHES Release)
target_compile_definitions(SqModule PRIVATE NDEBUG=1)
else()
target_compile_definitions(SqModule PRIVATE _DEBUG=1 SQMOD_EXCEPTLOC=1)
endif()
# Force 32-bit binaries when necessary
if(FORCE_32BIT_BIN)
set_target_properties(SqModule PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")