From 3ec3bc1c7ddb3a1d7280c6a277d6cf72be9561ba Mon Sep 17 00:00:00 2001 From: Tyler Yankee Date: Fri, 23 Jan 2026 17:39:56 -0500 Subject: [PATCH] cmake_host_system_information: Add VENDOR_STRING Issue: #27529 --- Help/command/cmake_host_system_information.rst | 5 +++++ Source/cmCMakeHostSystemInformationCommand.cxx | 3 +++ .../cmake_host_system_information/QueryKeys-stdout.txt | 1 + Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake | 1 + 4 files changed, 10 insertions(+) diff --git a/Help/command/cmake_host_system_information.rst b/Help/command/cmake_host_system_information.rst index cdd523ffad..73effab66b 100644 --- a/Help/command/cmake_host_system_information.rst +++ b/Help/command/cmake_host_system_information.rst @@ -207,6 +207,11 @@ queried. The list of queried values is stored in ````. The processor vendor ID +``VENDOR_STRING`` + .. versionadded:: 4.3 + + The processor vendor string + ``DISTRIB_INFO`` .. versionadded:: 3.22 diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 2a443f14b7..9674c520be 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -191,6 +191,9 @@ cm::optional GetValue(cmsys::SystemInformation& info, if (key == "VENDOR_ID"_s) { return ValueToString(info.GetVendorID()); } + if (key == "VENDOR_STRING"_s) { + return ValueToString(info.GetVendorString()); + } return {}; } diff --git a/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt b/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt index 1fe8a6f606..1a4322141e 100644 --- a/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt +++ b/Tests/RunCMake/cmake_host_system_information/QueryKeys-stdout.txt @@ -34,3 +34,4 @@ -- PROCESSOR_CACHE_SIZE=`.*` -- PROCESSOR_CLOCK_FREQUENCY=`[0-9]+[\\.[0-9]+]?` -- VENDOR_ID=`.*` +-- VENDOR_STRING=`.*` diff --git a/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake b/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake index b61b0d0ba2..2b497fbbc8 100644 --- a/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake +++ b/Tests/RunCMake/cmake_host_system_information/QueryKeys.cmake @@ -39,3 +39,4 @@ try_and_print(PROCESSOR_APIC_ID) try_and_print(PROCESSOR_CACHE_SIZE) try_and_print(PROCESSOR_CLOCK_FREQUENCY) try_and_print(VENDOR_ID) +try_and_print(VENDOR_STRING)