From 740488d89e69d026b8db0bf75b8bfe02ee464a3d Mon Sep 17 00:00:00 2001 From: kinichiro Date: Sat, 9 May 2020 18:46:13 +0900 Subject: 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") --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 515b3fc..a56f2e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,7 +299,7 @@ if(ENABLE_ASM) endif() elseif(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") set(HOST_ASM_MACOSX_X86_64 true) - elseif(MSVC AND "${CMAKE_GENERATOR}" MATCHES "Win64") + elseif(MSVC AND ("${CMAKE_GENERATOR}" MATCHES "Win64" OR "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")) set(HOST_ASM_MASM_X86_64 true) ENABLE_LANGUAGE(ASM_MASM) elseif(CMAKE_SYSTEM_NAME MATCHES "MINGW" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64") -- cgit v1.2.3-55-g6feb