@ -20,15 +20,26 @@ if(gRPC_SSL_PROVIDER STREQUAL "module")
if ( NOT BORINGSSL_ROOT_DIR )
set ( BORINGSSL_ROOT_DIR ${ CMAKE_CURRENT_SOURCE_DIR } /third_party/boringssl )
endif ( )
if ( EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt" )
if ( MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja" )
# V i s u a l S t u d i o b u i l d w i t h a s s e m b l y o p t i m i z a t i o n s i s b r o k e n ,
# b u t i t w o r k s w i t h N i n j a g e n e r a t o r .
# T h i s w i l l g e t e v e n t u a l l y f i x e d i n c m a k e , b u t u n t i l t h e n
# w e n e e d t o d i s a b l e a s s e m b l y o p t i m i z a t i o n s .
# S e e h t t p s : / / g i t h u b . c o m / g r p c / g r p c / i s s u e s / 1 6 3 7 6
set ( OPENSSL_NO_ASM ON )
if ( CMAKE_GENERATOR MATCHES "Visual Studio" )
if ( CMAKE_VERSION VERSION_LESS 3.13 )
# V i s u a l S t u d i o b u i l d w i t h a s s e m b l y o p t i m i z a t i o n s i s b r o k e n f o r o l d e r
# v e r s i o n o f CMake ( < 3.13 ) .
message ( WARNING "Disabling SSL assembly support because CMake version ${CMAKE_VERSION} is too old (less than 3.13)" )
set ( OPENSSL_NO_ASM ON )
else ( )
# I f w e ' r e u s i n g a n e w e n o u g h v e r s i o n o f C M a k e , m a k e s u r e t h a t t h e
# N A S M a s s e m b l e r c a n b e f o u n d .
include ( CheckLanguage )
check_language ( ASM_NASM )
if ( NOT CMAKE_ASM_NASM_COMPILER )
message ( WARNING "Disabling SSL assembly support because NASM could not be found" )
set ( OPENSSL_NO_ASM ON )
endif ( )
endif ( )
endif ( )
add_subdirectory ( ${ BORINGSSL_ROOT_DIR } third_party/boringssl )
if ( TARGET ssl )
set ( _gRPC_SSL_LIBRARIES ssl )