From 6f2d7e360847813d97a6f31461522dd0dad148a8 Mon Sep 17 00:00:00 2001 From: Tobias Leibner <7058290+tobiasleibner@users.noreply.github.com> Date: Fri, 5 Dec 2025 09:56:13 +0100 Subject: [PATCH] Add x86_64 as allowed value for CMAKE_SYSTEM_PROCESSOR --- Windows.Clang.toolchain.cmake | 24 ++++++++++++------------ Windows.Kits.cmake | 2 +- Windows.MSVC.toolchain.cmake | 34 +++++++++++++++++----------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Windows.Clang.toolchain.cmake b/Windows.Clang.toolchain.cmake index 81467a0..ac8e9aa 100644 --- a/Windows.Clang.toolchain.cmake +++ b/Windows.Clang.toolchain.cmake @@ -27,17 +27,17 @@ # # The following variables can be used to configure the behavior of this toolchain file: # -# | CMake Variable | Description | -# |---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| -# | CMAKE_SYSTEM_VERSION | The version of the operating system for which CMake is to build. Defaults to '10.0.19041.0'. | -# | CMAKE_SYSTEM_PROCESSOR | The processor to compiler for. One of 'X86', 'AMD64', 'ARM', 'ARM64'. Defaults to ${CMAKE_HOST_SYSTEM_PROCESSOR}. | -# | CMAKE_VS_PRODUCTS | One or more Visual Studio Product IDs to consider. Defaults to '*' | -# | CMAKE_VS_VERSION_PRERELEASE | Whether 'prerelease' versions of Visual Studio should be considered. Defaults to 'OFF' | -# | CMAKE_VS_VERSION_RANGE | A verson range for VS instances to find. For example, '[16.0,17.0)' will find versions '16.*'. Defaults to '[16.0,17.0)' | -# | CMAKE_WINDOWS_KITS_10_DIR | The location of the root of the Windows Kits 10 directory. | -# | CLANG_TIDY_CHECKS | List of rules clang-tidy should check. Defaults not set. | -# | TOOLCHAIN_UPDATE_PROGRAM_PATH | Whether the toolchain should update CMAKE_PROGRAM_PATH. Defaults to 'ON'. | -# | TOOLCHAIN_ADD_VS_NINJA_PATH | Whether the toolchain should add the path to the VS Ninja to the CMAKE_SYSTEM_PROGRAM_PATH. Defaults to 'ON'. | +# | CMake Variable | Description | +# |---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +# | CMAKE_SYSTEM_VERSION | The version of the operating system for which CMake is to build. Defaults to '10.0.19041.0'. | +# | CMAKE_SYSTEM_PROCESSOR | The processor to compile for. One of 'X86', 'AMD64', 'x86_64' (alias of AMD64), 'ARM', 'ARM64'. Defaults to ${CMAKE_HOST_SYSTEM_PROCESSOR}. | +# | CMAKE_VS_PRODUCTS | One or more Visual Studio Product IDs to consider. Defaults to '*' | +# | CMAKE_VS_VERSION_PRERELEASE | Whether 'prerelease' versions of Visual Studio should be considered. Defaults to 'OFF' | +# | CMAKE_VS_VERSION_RANGE | A verson range for VS instances to find. For example, '[16.0,17.0)' will find versions '16.*'. Defaults to '[16.0,17.0)' | +# | CMAKE_WINDOWS_KITS_10_DIR | The location of the root of the Windows Kits 10 directory. | +# | CLANG_TIDY_CHECKS | List of rules clang-tidy should check. Defaults not set. | +# | TOOLCHAIN_UPDATE_PROGRAM_PATH | Whether the toolchain should update CMAKE_PROGRAM_PATH. Defaults to 'ON'. | +# | TOOLCHAIN_ADD_VS_NINJA_PATH | Whether the toolchain should add the path to the VS Ninja to the CMAKE_SYSTEM_PROGRAM_PATH. Defaults to 'ON'. | # # The toolchain file will set the following variables: # @@ -157,7 +157,7 @@ set(VS_TOOLSET_PATH "${VS_INSTALLATION_PATH}/VC/Tools/MSVC/${CMAKE_VS_PLATFORM_T # Map CMAKE_SYSTEM_PROCESSOR values to CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE that identifies the tools that should # be used to produce code for the CMAKE_SYSTEM_PROCESSOR. -if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64) +if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) set(CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE x64) elseif((CMAKE_SYSTEM_PROCESSOR STREQUAL ARM) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL ARM64) diff --git a/Windows.Kits.cmake b/Windows.Kits.cmake index b94bc22..16b2d89 100644 --- a/Windows.Kits.cmake +++ b/Windows.Kits.cmake @@ -122,7 +122,7 @@ set(MIDL_COMPILER "${WINDOWS_KITS_BIN_PATH}/${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARC set(MDMERGE_TOOL "${WINDOWS_KITS_BIN_PATH}/${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}/mdmerge.exe") # Windows SDK -if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64) +if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) set(WINDOWS_KITS_TARGET_ARCHITECTURE x64) elseif((CMAKE_SYSTEM_PROCESSOR STREQUAL ARM) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL ARM64) diff --git a/Windows.MSVC.toolchain.cmake b/Windows.MSVC.toolchain.cmake index 276a06c..92bdca4 100644 --- a/Windows.MSVC.toolchain.cmake +++ b/Windows.MSVC.toolchain.cmake @@ -27,22 +27,22 @@ # # The following variables can be used to configure the behavior of this toolchain file: # -# | CMake Variable | Description | -# |---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| -# | CMAKE_SYSTEM_PROCESSOR | The processor to compiler for. One of 'X86', 'AMD64', 'ARM', 'ARM64'. Defaults to ${CMAKE_HOST_SYSTEM_PROCESSOR}. | -# | CMAKE_SYSTEM_VERSION | The version of the operating system for which CMake is to build. Defaults to the host version. | -# | CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE | The architecture of the tooling to use. Defaults to 'arm64' on ARM64 systems, otherwise 'x64'. | -# | CMAKE_VS_PRODUCTS | One or more Visual Studio Product IDs to consider. Defaults to '*' | -# | CMAKE_VS_VERSION_PRERELEASE | Whether 'prerelease' versions of Visual Studio should be considered. Defaults to 'OFF' | -# | CMAKE_VS_VERSION_RANGE | A verson range for VS instances to find. For example, '[16.0,17.0)' will find versions '16.*'. Defaults to '[16.0,17.0)' | -# | CMAKE_WINDOWS_KITS_10_DIR | The location of the root of the Windows Kits 10 directory. | -# | TOOLCHAIN_UPDATE_PROGRAM_PATH | Whether the toolchain should update CMAKE_PROGRAM_PATH. Defaults to 'ON'. | -# | TOOLCHAIN_ADD_VS_NINJA_PATH | Whether the toolchain should add the path to the VS Ninja to the CMAKE_SYSTEM_PROGRAM_PATH. Defaults to 'ON'. | -# | VS_EXPERIMENTAL_MODULE | Whether experimental module support should be enabled. | -# | VS_INSTALLATION_PATH | The location of the root of the Visual Studio installation. If not specified VSWhere will be used to search for one. | -# | VS_PLATFORM_TOOLSET_VERSION | The version of the MSVC toolset to use. For example, 14.29.30133. Defaults to the highest available. | -# | VS_USE_SPECTRE_MITIGATION_ATLMFC_RUNTIME | Whether the compiler should link with the ATLMFC runtime that uses 'Spectre' mitigations. Defaults to 'OFF'. | -# | VS_USE_SPECTRE_MITIGATION_RUNTIME | Whether the compiler should link with a runtime that uses 'Spectre' mitigations. Defaults to 'OFF'. | +# | CMake Variable | Description | +# |---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +# | CMAKE_SYSTEM_PROCESSOR | The processor to compile for. One of 'X86', 'AMD64', 'x86_64' (alias of AMD64), 'ARM', 'ARM64'. Defaults to ${CMAKE_HOST_SYSTEM_PROCESSOR}. | +# | CMAKE_SYSTEM_VERSION | The version of the operating system for which CMake is to build. Defaults to the host version. | +# | CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE | The architecture of the tooling to use. Defaults to 'arm64' on ARM64 systems, otherwise 'x64'. | +# | CMAKE_VS_PRODUCTS | One or more Visual Studio Product IDs to consider. Defaults to '*' | +# | CMAKE_VS_VERSION_PRERELEASE | Whether 'prerelease' versions of Visual Studio should be considered. Defaults to 'OFF' | +# | CMAKE_VS_VERSION_RANGE | A verson range for VS instances to find. For example, '[16.0,17.0)' will find versions '16.*'. Defaults to '[16.0,17.0)' | +# | CMAKE_WINDOWS_KITS_10_DIR | The location of the root of the Windows Kits 10 directory. | +# | TOOLCHAIN_UPDATE_PROGRAM_PATH | Whether the toolchain should update CMAKE_PROGRAM_PATH. Defaults to 'ON'. | +# | TOOLCHAIN_ADD_VS_NINJA_PATH | Whether the toolchain should add the path to the VS Ninja to the CMAKE_SYSTEM_PROGRAM_PATH. Defaults to 'ON'. | +# | VS_EXPERIMENTAL_MODULE | Whether experimental module support should be enabled. | +# | VS_INSTALLATION_PATH | The location of the root of the Visual Studio installation. If not specified VSWhere will be used to search for one. | +# | VS_PLATFORM_TOOLSET_VERSION | The version of the MSVC toolset to use. For example, 14.29.30133. Defaults to the highest available. | +# | VS_USE_SPECTRE_MITIGATION_ATLMFC_RUNTIME | Whether the compiler should link with the ATLMFC runtime that uses 'Spectre' mitigations. Defaults to 'OFF'. | +# | VS_USE_SPECTRE_MITIGATION_RUNTIME | Whether the compiler should link with a runtime that uses 'Spectre' mitigations. Defaults to 'OFF'. | # # The toolchain file will set the following variables: # @@ -170,7 +170,7 @@ set(VS_TOOLSET_PATH "${VS_INSTALLATION_PATH}/VC/Tools/MSVC/${CMAKE_VS_PLATFORM_T # Map CMAKE_SYSTEM_PROCESSOR values to CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE that identifies the tools that should # be used to produce code for the CMAKE_SYSTEM_PROCESSOR. -if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64) +if(CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) set(CMAKE_VS_PLATFORM_TOOLSET_ARCHITECTURE x64) elseif((CMAKE_SYSTEM_PROCESSOR STREQUAL ARM) OR (CMAKE_SYSTEM_PROCESSOR STREQUAL ARM64)