Enable -Werror with JSONCPP_WITH_WARNING_AS_ERROR

Commit 912d55094d disabled '-Werror'. Enable it
if jsoncpp is build with JSONCPP_WITH_WARNING_AS_ERROR=ON.
This commit is contained in:
Jörg Krause 2015-10-29 09:19:41 +01:00
parent 48bfe91062
commit 7c93031c9b

View File

@ -85,6 +85,7 @@ macro(UseCompilationWarningAsError)
# warnings when compiled in release configuration.
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
if (JSONCPP_WITH_STRICT_ISO)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")
endif ()