From 3e8911aad513cfdf7febb2e333beffee451fb837 Mon Sep 17 00:00:00 2001 From: DRC Date: Mon, 11 Jan 2021 13:56:01 -0600 Subject: [PATCH] Build: Use correct SIMD exts w/VStudio IDE + Arm64 When configuring a Visual Studio IDE build and passing -A arm64 to CMake, CMAKE_SYSTEM_PROCESSOR will be amd64, so we should set CPU_TYPE based on the value of CMAKE_GENERATOR_PLATFORM rather than the value of CMAKE_SYSTEM_PROCESSOR. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ca6f986..826d59f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,10 @@ elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "ppc*" OR else() set(CPU_TYPE ${CMAKE_SYSTEM_PROCESSOR_LC}) endif() +if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64") + set(CPU_TYPE arm64) +endif() + message(STATUS "${BITS}-bit build (${CPU_TYPE})")