Added option do disable WINPR_ASSERT

This commit is contained in:
akallabeth 2021-06-10 08:57:40 +02:00 committed by akallabeth
parent d36d94766e
commit 3a75228242
2 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,12 @@ project(WinPR C)
set(CMAKE_COLOR_MAKEFILE ON) set(CMAKE_COLOR_MAKEFILE ON)
option(WITH_VERBOSE_WINPR_ASSERT "Compile with verbose WINPR_ASSERT." ON)
if (WITH_VERBOSE_WINPR_ASSERT)
add_definitions(-DWITH_VERBOSE_WINPR_ASSERT)
endif()
if(FREERDP_VERSION) if(FREERDP_VERSION)
set(FREERDP_BUILD 1) set(FREERDP_BUILD 1)
endif() endif()

View File

@ -26,6 +26,7 @@
#include <winpr/wtypes.h> #include <winpr/wtypes.h>
#include <winpr/wlog.h> #include <winpr/wlog.h>
#if WITH_VERBOSE_WINPR_ASSERT
#define WINPR_ASSERT(cond) \ #define WINPR_ASSERT(cond) \
do \ do \
{ \ { \
@ -36,6 +37,12 @@
abort(); \ abort(); \
} \ } \
} while (0) } while (0)
#else
#define WINPR_ASSERT(cond) \
do \
{ \
} while (0)
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"