mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
CMake: Use CMAKE_C_FLAGS instead of add_compile_options
This is for compatibility reasons with old CMake 2.8 versions.
This commit is contained in:
parent
966646d70e
commit
5838e279a5
@ -12,7 +12,7 @@ set(CJSON_UTILS_VERSION_SO 1)
|
||||
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
|
||||
if(("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang"))
|
||||
add_compile_options(-ansi -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings")
|
||||
endif()
|
||||
|
||||
#variables for pkg-config
|
||||
|
Loading…
Reference in New Issue
Block a user