Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
4526d8ba
Unverified
Commit
4526d8ba
authored
Oct 27, 2017
by
Jisi Liu
Committed by
GitHub
Oct 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3722 from timou/cmake-windows-clean
Suppress VS2017 compiler/linker warnings
parents
23adfeb0
a23669c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
CMakeLists.txt
cmake/CMakeLists.txt
+20
-1
No files found.
cmake/CMakeLists.txt
View file @
4526d8ba
...
...
@@ -135,12 +135,31 @@ 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
)
# MSVC warning suppressions
add_definitions
(
/wd4018
# 'expression' : signed/unsigned mismatch
/wd4065
# switch statement contains 'default' but no 'case' labels
/wd4146
# unary minus operator applied to unsigned type, result still unsigned
/wd4244
# 'conversion' conversion from 'type1' to 'type2', possible loss of data
/wd4251
# 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
/wd4267
# 'var' : conversion from 'size_t' to 'type', possible loss of data
/wd4305
# 'identifier' : truncation from 'type1' to 'type2'
/wd4307
# 'operator' : integral constant overflow
/wd4309
# 'conversion' : truncation of constant value
/wd4334
# 'operator' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
/wd4355
# 'this' : used in base member initializer list
/wd4506
# no definition for inline function 'function'
/wd4800
# 'type' : forcing value to bool 'true' or 'false' (performance warning)
/wd4996
# The compiler encountered a deprecated declaration.
)
# 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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment