Skip to content

Commit

Permalink
Intel compiler: silence noisy warning for incorrectly evaluated inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins authored and acozzette committed Feb 12, 2020
1 parent 8312c36 commit 10c48c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10c48c9

Please sign in to comment.