build: Define DEBUG macro again only in debug builds

This commit is contained in:
WerWolv 2024-01-26 21:11:42 +01:00
parent b7349e42c7
commit f5c529b2b3
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ macro(addDefines)
add_compile_definitions(NDEBUG) add_compile_definitions(NDEBUG)
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug") elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-Debug) set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-Debug)
add_compile_definitions(DEBUG)
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}) set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING})
add_compile_definitions(NDEBUG) add_compile_definitions(NDEBUG)
@ -31,7 +32,7 @@ macro(addDefines)
endif () endif ()
if (IMHEX_ENABLE_STD_ASSERTS) if (IMHEX_ENABLE_STD_ASSERTS)
add_compile_definitions(DEBUG _GLIBCXX_DEBUG _GLIBCXX_VERBOSE) add_compile_definitions(_GLIBCXX_DEBUG _GLIBCXX_VERBOSE)
endif() endif()
if (IMHEX_STATIC_LINK_PLUGINS) if (IMHEX_STATIC_LINK_PLUGINS)