mirror of
https://github.com/json-c/json-c.git
synced 2026-04-04 04:49:06 +08:00
update testcase and delete debug -O0 build
This commit is contained in:
@@ -24,6 +24,8 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE debug)
|
set(CMAKE_BUILD_TYPE debug)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELAESE} -O2")
|
||||||
|
|
||||||
# Include file check macros honor CMAKE_REQUIRED_LIBRARIES
|
# Include file check macros honor CMAKE_REQUIRED_LIBRARIES
|
||||||
# i.e. the check_include_file() calls will include -lm when checking.
|
# i.e. the check_include_file() calls will include -lm when checking.
|
||||||
if(POLICY CMP0075)
|
if(POLICY CMP0075)
|
||||||
@@ -243,9 +245,6 @@ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4701")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4701")
|
||||||
endif()
|
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"))
|
if (NOT ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"))
|
||||||
check_c_source_compiles(
|
check_c_source_compiles(
|
||||||
[=[
|
[=[
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
|
||||||
#else
|
|
||||||
#include <assert.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
#include "strerror_override_private.h"
|
#include "strerror_override_private.h"
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
|
||||||
#else
|
|
||||||
#include <assert.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user