jsoncpp: Disable warnings to avoid changing 3rd party code
Add '-w' or equivalent flag on compilers supporting it. Tell MSVC to use its lowest warning level inside jsoncpp sources.
This commit is contained in:
parent
1fc556536e
commit
06f41e986c
|
@ -1,5 +1,13 @@
|
||||||
project(JsonCpp CXX)
|
project(JsonCpp CXX)
|
||||||
|
|
||||||
|
# Disable warnings to avoid changing 3rd party code.
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES
|
||||||
|
"^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
|
||||||
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PathScale")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -woffall")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(JSONCPP_SOURCES
|
set(JSONCPP_SOURCES
|
||||||
src/lib_json/json_batchallocator.h
|
src/lib_json/json_batchallocator.h
|
||||||
src/lib_json/json_reader.cpp
|
src/lib_json/json_reader.cpp
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
// Include KWSys Large File Support configuration.
|
// Include KWSys Large File Support configuration.
|
||||||
#include <cmsys/Configure.h>
|
#include <cmsys/Configure.h>
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
# pragma warning(push,1)
|
||||||
|
#endif
|
||||||
|
|
||||||
/// If defined, indicates that json library is embedded in CppTL library.
|
/// If defined, indicates that json library is embedded in CppTL library.
|
||||||
//# define JSON_IN_CPPTL 1
|
//# define JSON_IN_CPPTL 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue