summaryrefslogtreecommitdiffstats
path: root/package/jsoncpp/0001-CMakeLists.txt-Treat-conversion-warning-as-error-onl.patch
blob: 3e009b93a6e5cd409901d3c0f928625abf094e6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 98a7f56ed41071240274063b2d4e39e4e1c9589f Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Mon, 25 Apr 2016 19:41:28 +0200
Subject: [PATCH 1/1] CMakeLists.txt: Treat conversion warning as error only
 with JSONCPP_WITH_WARNING_AS_ERROR=On

Fixes errors when building with buildroot:
http://autobuild.buildroot.net/?reason=jsoncpp-1.7.2

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
(Patch sent upstream:
 https://github.com/open-source-parsers/jsoncpp/pull/466)
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7787850..637fc34 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -107,11 +107,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Werror=conversion -Werror=sign-compare")
 elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
   # using GCC
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -Werror=conversion")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra")
   # not yet ready for -Wsign-conversion
 
   if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion -pedantic")
   endif ()
 endif()
 
-- 
2.8.0.rc3

OpenPOWER on IntegriCloud