Merge pull request #589 from ya1gaurav/patch-42

Fix warning issue with gcc flags.

closes #586
This commit is contained in:
Christopher Dunn 2017-04-05 19:50:21 -05:00 committed by GitHub
commit 86ed860c4b

View File

@ -112,8 +112,11 @@ ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -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} -Werror=conversion -pedantic")
IF(JSONCPP_WITH_STRICT_ISO)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
ENDIF()
IF(JSONCPP_WITH_WARNING_AS_ERROR)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion")
ENDIF()
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
# using Intel compiler