Skip to content

Commit 7c93031

Browse files
committed
Enable -Werror with JSONCPP_WITH_WARNING_AS_ERROR
Commit 912d550 disabled '-Werror'. Enable it if jsoncpp is build with JSONCPP_WITH_WARNING_AS_ERROR=ON.
1 parent 48bfe91 commit 7c93031

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ macro(UseCompilationWarningAsError)
8585
# warnings when compiled in release configuration.
8686
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
8787
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
88+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
8889
if (JSONCPP_WITH_STRICT_ISO)
8990
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
9091
endif ()

0 commit comments

Comments
 (0)