Intel compiler: silence noisy warning for incorrectly evaluated inlining

pull/7208/head
Chuck Atkins 5 years ago committed by Adam Cozzette
parent 8312c36567
commit 10c48c980f
  1. 8
      cmake/CMakeLists.txt

@ -28,6 +28,14 @@ else()
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
# The Intel compiler isn't able to deal with noinline member functions of
# template classses defined in headers. As such it spams the output with
# warning #2196: routine is both "inline" and "noinline"
# This silences that warning.
if (CMAKE_CXX_COMPILER_ID MATCHES Intel)
string(APPEND CMAKE_CXX_FLAGS " -diag-disable=2196")
endif()
# Options
option(protobuf_BUILD_TESTS "Build tests" ON)
option(protobuf_BUILD_CONFORMANCE "Build conformance tests" OFF)

Loading…
Cancel
Save