mirror of
https://github.com/json-c/json-c.git
synced 2026-04-01 03:19:06 +08:00
modify json-c default build type, and fix up the assert() errors in testcase
This commit is contained in:
@@ -52,8 +52,3 @@ target_link_libraries(
|
||||
|
||||
endforeach(TESTNAME)
|
||||
|
||||
# Make sure NDEBUG is always undefined for tests
|
||||
if (UNIX OR MINGW OR CYGWIN)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -UNDEBUG")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
#else
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#include "strerror_override.h"
|
||||
#include "strerror_override_private.h"
|
||||
#ifdef NDEBUG
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
#else
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user