diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/gflags.cmake | 4 | ||||
-rw-r--r-- | cmake/ssl.cmake | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/cmake/gflags.cmake b/cmake/gflags.cmake index 01e0a75b60..c301b1cdb6 100644 --- a/cmake/gflags.cmake +++ b/cmake/gflags.cmake @@ -28,8 +28,8 @@ if("${gRPC_GFLAGS_PROVIDER}" STREQUAL "module") elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package") # Use "CONFIG" as there is no built-in cmake module for gflags. find_package(gflags REQUIRED CONFIG) - if(TARGET gflags::gflags) - set(_gRPC_GFLAGS_LIBRARIES gflags::gflags) + if(TARGET gflags) + set(_gRPC_GFLAGS_LIBRARIES gflags) set(_gRPC_GFLAGS_INCLUDE_DIR ${GFLAGS_INCLUDE_DIR}) endif() set(_gRPC_FIND_GFLAGS "if(NOT gflags_FOUND)\n find_package(gflags CONFIG)\nendif()") diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 83f642a675..19a7d779b3 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -17,7 +17,14 @@ if("${gRPC_SSL_PROVIDER}" STREQUAL "module") set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) endif() if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt") - set(OPENSSL_NO_ASM ON) # make boringssl buildable with Visual Studio + if (MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja") + # Visual Studio build with assembly optimizations is broken, + # but it works with Ninja generator. + # This will get eventually fixed in cmake, but until then + # we need to disable assembly optimizations. + # See https://github.com/grpc/grpc/issues/16376 + set(OPENSSL_NO_ASM ON) + endif() add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl) if(TARGET ssl) set(_gRPC_SSL_LIBRARIES ssl) |