Browse Source

Merge pull request #441 from changyongGuo/c_flag_error

fix c flag loss during cmake building
tags/json-c-0.14-20200419
Eric Haszlakiewicz GitHub 7 years ago
parent
commit
0a8ac2ed92
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      CMakeLists.txt

+ 1
- 1
CMakeLists.txt View File

@@ -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")


Loading…
Cancel
Save