cpuinfo
cpuinfo copied to clipboard
Support ARM64EC vcpkg build
-
Use
CMAKE_C_COMPILER_ARCHITECTURE_IDto determine target processor when compiler is MSVC. The existing logic only handles the VS generator. Added a case to support other generators like Ninja. -
Replace existing usages of
CMAKE_SYSTEM_PROCESSORwithCPUINFO_TARGET_PROCESSOR. One of these was required in order to build for ARM64EC with vcpkg (where it was hitting this warning).
https://github.com/pytorch/cpuinfo/blob/8a9210069b5a37dd89ed118a783945502a30a4ae/CMakeLists.txt#L91-L97
Context: CMAKE_SYSTEM_PROCESSOR is known to have issues on Windows. See this issue. This comment suggests using CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID.