mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-05 18:41:10 +02:00
Fix warning issue with gcc flags.
PR for - https://github.com/open-source-parsers/jsoncpp/issues/586 Separating the default options for compiler flags.
This commit is contained in:
parent
264c3edca7
commit
11c48d0047
@ -112,8 +112,10 @@ ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wshadow -Wextra")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wconversion -Wshadow -Wextra")
|
||||||
# not yet ready for -Wsign-conversion
|
# not yet ready for -Wsign-conversion
|
||||||
|
|
||||||
IF(JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR)
|
IF(JSONCPP_WITH_STRICT_ISO)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion -pedantic")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
|
||||||
|
IF(JSONCPP_WITH_WARNING_AS_ERROR)
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||||
# using Intel compiler
|
# using Intel compiler
|
||||||
|
Loading…
x
Reference in New Issue
Block a user