1
0
mirror of synced 2025-01-30 03:27:25 +01:00

build: Disable assertions in release builds

This commit is contained in:
WerWolv 2023-05-13 17:49:53 +02:00
parent 4afd5a7905
commit 6e5d6810e7

View File

@ -60,13 +60,16 @@ macro(addDefines)
set(IMHEX_VERSION_STRING ${IMHEX_VERSION})
if (CMAKE_BUILD_TYPE STREQUAL "Release")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING})
add_compile_definitions(NDEBUG)
elseif (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-Debug)
add_compile_definitions(DEBUG _GLIBCXX_DEBUG _GLIBCXX_VERBOSE)
elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-RelWithDebInfo)
add_compile_definitions(NDEBUG)
elseif (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set(IMHEX_VERSION_STRING ${IMHEX_VERSION_STRING}-MinSizeRel)
add_compile_definitions(NDEBUG)
endif ()
add_compile_definitions(IMHEX_VERSION="${IMHEX_VERSION_STRING}")