From: changyong guo Date: Tue, 14 Aug 2018 05:52:18 +0000 (+0800) Subject: fix c flag loss during cmake building X-Git-Tag: json-c-0.14-20200419~114^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F441%2Fhead;p=thirdparty%2Fjson-c.git fix c flag loss during cmake building --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a404ce73..461b0192 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,7 +173,7 @@ configure_package_config_file( if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections") # There's a catch here. - set(CMAKE_C_FLAGS "-Werror") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") add_definitions(-D_GNU_SOURCE) elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")