mdbx-cmake: add MDBX_FORCE_ASSERTIONS.

This commit is contained in:
Leonid Yuriev 2019-12-20 01:31:17 +03:00
parent 78e146692a
commit e8686a4170
4 changed files with 6 additions and 1 deletions

View File

@ -326,6 +326,7 @@ mark_as_advanced(MDBX_LOCKING)
add_mdbx_option(MDBX_TRUST_RTC "Does a system have battery-backed Real-Time Clock or just a fake." AUTO)
mark_as_advanced(MDBX_TRUST_RTC)
option(MDBX_ENABLE_TESTS "Build MDBX tests." ${BUILD_TESTING})
option(MDBX_FORCE_ASSERTIONS "Force enable assertion checking." OFF)
################################################################################
################################################################################

View File

@ -12,6 +12,7 @@
#cmakedefine ENABLE_GPROF
#cmakedefine ENABLE_GCOV
#cmakedefine ENABLE_ASAN
#cmakedefine MDBX_FORCE_ASSERTIONS
/* Common */
#cmakedefine01 MDBX_TXN_CHECKOWNER

View File

@ -17070,6 +17070,9 @@ __dll_export
#ifdef MDBX_USE_VALGRIND
" MDBX_USE_VALGRIND=YES"
#endif /* MDBX_USE_VALGRIND */
#ifdef MDBX_FORCE_ASSERTIONS
" MDBX_FORCE_ASSERTIONS=YES"
#endif /* MDBX_FORCE_ASSERTIONS */
#ifdef _GNU_SOURCE
" _GNU_SOURCE=YES"
#else

View File

@ -1010,7 +1010,7 @@ MDBX_INTERNAL_FUNC void mdbx_panic(const char *fmt, ...) __printf_args(1, 2);
#define mdbx_audit_enabled() (0)
#if !defined(NDEBUG) || defined(MDBX_FORCE_ASSERT)
#if !defined(NDEBUG) || defined(MDBX_FORCE_ASSERTIONS)
#define mdbx_assert_enabled() (1)
#else
#define mdbx_assert_enabled() (0)