Browse Source

update testcase and delete debug -O0 build

tags/json-c-0.14-20200419
dota17 5 years ago
parent
commit
e56ab0146f
3 changed files with 4 additions and 9 deletions
  1. +2
    -3
      CMakeLists.txt
  2. +1
    -3
      tests/test_deep_copy.c
  3. +1
    -3
      tests/test_json_pointer.c

+ 2
- 3
CMakeLists.txt View File

@@ -24,6 +24,8 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE debug)
endif()

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELAESE} -O2")

# Include file check macros honor CMAKE_REQUIRED_LIBRARIES
# i.e. the check_include_file() calls will include -lm when checking.
if(POLICY CMP0075)
@@ -243,9 +245,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4701")
endif()

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_C_FLAGS_Release "${CMAKE_C_FLAGS_Release} -O2")

if (NOT ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"))
check_c_source_compiles(
[=[


+ 1
- 3
tests/test_deep_copy.c View File

@@ -4,10 +4,8 @@
#include <string.h>
#ifdef NDEBUG
#undef NDEBUG
#include <assert.h>
#else
#include <assert.h>
#endif
#include <assert.h>
#include <errno.h>
#include <time.h>



+ 1
- 3
tests/test_json_pointer.c View File

@@ -2,10 +2,8 @@
#include "strerror_override_private.h"
#ifdef NDEBUG
#undef NDEBUG
#include <assert.h>
#else
#include <assert.h>
#endif
#include <assert.h>
#include <stdio.h>
#include <string.h>



Loading…
Cancel
Save