mirror of
https://github.com/json-c/json-c.git
synced 2026-04-02 20:09:06 +08:00
fix c flag loss during cmake building
This commit is contained in:
@@ -173,7 +173,7 @@ configure_package_config_file(
|
|||||||
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||||||
# There's a catch here.
|
# There's a catch here.
|
||||||
set(CMAKE_C_FLAGS "-Werror")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||||
|
|
||||||
add_definitions(-D_GNU_SOURCE)
|
add_definitions(-D_GNU_SOURCE)
|
||||||
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
|
||||||
|
|||||||
Reference in New Issue
Block a user