Skip to content

Wrong CMAKE_SYSTEM_PROCESSOR (AMD64 with MSVC ARM64 toolchain) on Windows arm64

CMake detects the wrong system processor on Windows on ARM.

CMakeLists.txt:

project (Example)

message( "Current System Processor: ${CMAKE_SYSTEM_PROCESSOR}" )

CMake Configuration Output:

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22598.
-- The C compiler identification is MSVC 19.33.31517.0
-- The CXX compiler identification is MSVC 19.33.31517.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.33.31517/bin/HostARM64/ARM64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.33.31517/bin/HostARM64/ARM64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

Current System Processor: AMD64

-- Configuring done (2.8s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/vm/source/Demo-CMake-Arch-Detection/build

CMake Details:

  • Version: 3.27.8
  • Build: x64 (from chocolatey)

System Details:

OS Version:                10.0.22598 N/A Build 22598
OS Manufacturer:           Microsoft Corporation
System Type:               ARM64-based PC
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information