diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2017-01-11 16:12:46 +0100 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2017-01-12 10:23:48 +0100 |
commit | 3aab96f56c7de370070e9966cf3728fbcd1018dd (patch) | |
tree | b10428e6a4b7f2969c577f53862afa81303f90a5 | |
parent | 3cdf729eb07b60cd635aadb91718ee54a2f0e808 (diff) |
successfuly compile gRPC with cmake+Ninja
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | templates/CMakeLists.txt.template | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fd271d472d..9e6b5f6bee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,13 @@ set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package") set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library") if (MSVC) - add_definitions( -D_WIN32_WINNT=0x600 ) + add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) + # needed to compile boringssl + add_definitions(/wd4464 /wd4623 /wd4668 /wd4701 /wd4702 /wd4777 /wd5027) + # needed to compile protobuf + add_definitions(/wd4065 /wd4506) + # TODO(jtattermusch): revisit C4267 occurrences throughout the code + add_definitions(/wd4267) endif() if (gRPC_USE_PROTO_LITE) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index c3c636c6af..8d49abeffd 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -84,7 +84,13 @@ set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library") if (MSVC) - add_definitions( -D_WIN32_WINNT=0x600 ) + add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) + # needed to compile boringssl + add_definitions(/wd4464 /wd4623 /wd4668 /wd4701 /wd4702 /wd4777 /wd5027) + # needed to compile protobuf + add_definitions(/wd4065 /wd4506) + # TODO(jtattermusch): revisit C4267 occurrences throughout the code + add_definitions(/wd4267) endif() if (gRPC_USE_PROTO_LITE) |