Skip to content
Permalink
Browse files

Intel compiler: silence noisy warning for incorrectly evaluated inlining

  • Loading branch information
chuckatkins authored and acozzette committed Feb 11, 2020
1 parent 8312c36 commit 10c48c980f8a6c81ba6e117590ee7843c89d593f
Showing with 8 additions and 0 deletions.
  1. +8 −0 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)

0 comments on commit 10c48c9

Please sign in to comment.
You can’t perform that action at this time.