Browse Source

JsonCpp: Ignore deprecation warnings

Chuck Atkins 6 years ago
parent
commit
2c280acdf8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      CMakeLists.txt

+ 4 - 0
CMakeLists.txt

@@ -538,6 +538,10 @@ macro (CMAKE_BUILD_UTILITIES)
       message(FATAL_ERROR
       message(FATAL_ERROR
         "CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
         "CMAKE_USE_SYSTEM_JSONCPP is ON but a JsonCpp is not found!")
     endif()
     endif()
+    if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+      set_property(TARGET JsonCpp::JsonCpp APPEND PROPERTY
+        INTERFACE_COMPILE_OPTIONS -Wno-deprecated-declarations)
+    endif()
     set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp)
     set(CMAKE_JSONCPP_LIBRARIES JsonCpp::JsonCpp)
   else()
   else()
     set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp)
     set(CMAKE_JSONCPP_LIBRARIES cmjsoncpp)