Remove NDEBUG for tests.

A great deal of checks in tests are performed using asserts, which
get stripped in release builds, when NDEBUG is defined. To facilitate
testing release builds, undefine NDEBUG for all tests.

Refs https://github.com/resiprocate/resiprocate/issues/423.
This commit is contained in:
Andrey Semashev
2025-09-05 20:56:37 +03:00
parent e727f04c34
commit a5200c5211

View File

@@ -15,6 +15,8 @@ endfunction()
function(test_base target)
add_executable(${target} ${ARGN})
add_test(NAME ${target} COMMAND $<TARGET_FILE:${target}>)
# Don't strip asserts in release builds
target_compile_options(${target} PRIVATE -UNDEBUG)
set_tests_properties(${target} PROPERTIES TIMEOUT 300)
endfunction()