aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Tim Ebringer <tim.ebringer@gmail.com>2017-10-06 14:26:43 -0400
committerGravatar Tim Ebringer <tde@slowdogs.com.au>2017-10-06 15:56:30 -0400
commit2a7284042531771b6c00a1e6fd1d0d36738266ac (patch)
tree4240909a59e38c7e2958ba794ea67cfb7588cfcc /cmake
parent77f64bb7779ec2195f9bc4dc82497d12c18fc6b7 (diff)
Suppress VS2017 compiler/linker warnings
VS2017 warns about a few additional things, for example, files that define no symbols (which is typically the result of a platform specific ifdef not applying on Windows). Suppress these warnings so the build is clean on VS2017.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 7618ba21..9e2912e0 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -135,12 +135,15 @@ endif (protobuf_BUILD_SHARED_LIBS)
if (MSVC)
# Build with multiple processes
add_definitions(/MP)
- add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4309)
+ add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /wd4309 /wd4065 /wd4506 /wd4307 /wd4334)
# Allow big object
add_definitions(/bigobj)
string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR})
string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR})
configure_file(extract_includes.bat.in extract_includes.bat)
+
+ # Suppress linker warnings about files with no symbols defined.
+ set(CMAKE_STATIC_LINKER_FLAGS /ignore:4221)
endif (MSVC)
get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH)