mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add warning -Wswitch-enum
This commit is contained in:
parent
eb8c0baa3b
commit
a9ce4e6bbc
@ -45,6 +45,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
|
||||
-Wunused-macros
|
||||
-Wmissing-variable-declarations
|
||||
-Wused-but-marked-unused
|
||||
-Wswitch-enum
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -25,6 +25,14 @@ if(ENABLE_CJSON_TEST)
|
||||
target_compile_options(unity PRIVATE "-fno-sanitize=float-divide-by-zero")
|
||||
endif()
|
||||
endif()
|
||||
# Disable -Wswitch-enum for Unity
|
||||
if (FLAG_SUPPORTED_Wswitchenum)
|
||||
if ("${CMAKE_VERSION}" VERSION_LESS "2.8.12")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-switch-enum")
|
||||
else()
|
||||
target_compile_options(unity PRIVATE "-Wno-switch-enum")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#copy test files
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/inputs")
|
||||
|
Loading…
Reference in New Issue
Block a user