Fix cmake build to enable masm with VS2019

To specify architecture Visual Studio 16 2019 requires -A option,
and it is stored in variable CMAKE_GENERATOR_PLATFORM.
Until Visual Studio 15 2017, architecture was indicated as part of
generator string (e.g. "Visual Studio 15 2017 Win64")
This commit is contained in:
kinichiro
2020-05-09 18:46:13 +09:00
parent 0e8011de3c
commit 740488d89e
2 changed files with 3 additions and 2 deletions

View File

@@ -936,7 +936,8 @@ if(NOT ENABLE_ASM)
add_definitions(-DOPENSSL_NO_ASM)
else()
if(MSVC)
if(NOT "${CMAKE_GENERATOR}" MATCHES "Win64")
if((NOT "${CMAKE_GENERATOR}" MATCHES "Win64") AND
(NOT "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64"))
add_definitions(-DOPENSSL_NO_ASM)
endif()
elseif(WIN32)