From 1c9f8eeb4f03e71a3166217d7c074d3b34e3b113 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 26 Feb 2025 14:42:39 -0500 Subject: [PATCH] Help: Document CMAKE__COMPILER_ARCHITECTURE_ID Issue: #17702 --- Help/manual/cmake-variables.7.rst | 2 +- .../CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst | 166 +++++++++++++++++- 2 files changed, 163 insertions(+), 5 deletions(-) diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 735f11e455..50a344cc79 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -73,6 +73,7 @@ Variables that Provide Information /variable/CMAKE_JOB_POOL_PRECOMPILE_HEADER /variable/CMAKE_JOB_POOLS /variable/CMAKE_LANG_COMPILER_AR + /variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID /variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT /variable/CMAKE_LANG_COMPILER_LINKER /variable/CMAKE_LANG_COMPILER_LINKER_FRONTEND_VARIANT @@ -815,7 +816,6 @@ are subject to change, and not recommended for use in project code. /variable/CMAKE_HOME_DIRECTORY /variable/CMAKE_INTERNAL_PLATFORM_ABI /variable/CMAKE_LANG_COMPILER_ABI - /variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID /variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL /variable/CMAKE_LANG_LINKER_PREFERENCE /variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES diff --git a/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst index 8057566026..817a95f156 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID.rst @@ -3,8 +3,166 @@ CMAKE__COMPILER_ARCHITECTURE_ID .. versionadded:: 3.10 -An internal variable subject to change. +Identifier indicating the +target architecture of the compiler for language ````. -This is used to identify the variant of a compiler based on its target -architecture. For some compilers this is needed to determine the correct -usage. +Possible values for each platform are documented in the following sections. + +Windows Platforms with MSVC ABI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.10 + +These identifiers are used when the :variable:`CMAKE__COMPILER` +targets Windows with a MSVC ABI (``_WIN32`` and ``_MSC_VER`` are defined). + +``ARM64`` + ARM 64-bit + +``ARM64EC`` + ARM 64-bit Emulation-Compatible + +``ARMV4I``, ``ARMV5I``, ``ARMV7`` + ARM 32-bit + +``IA64`` + Itanium 64-bit + +``MIPS`` + MIPS + +``SHx``, ``SH3``, ``SH3DSP``, ``SH4``, ``SH5`` + SuperH + +``x64`` + Intel 64-bit + +``X86`` + Intel 32-bit + +Windows Platforms with Watcom ABI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.10 + +These identifiers are used when :variable:`CMAKE__COMPILER_ID` is +``OpenWatcom`` or ``Watcom``. + +``I86`` + Intel 16-bit + +``X86`` + Intel 32-bit + +Green Hills MULTI Platforms +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.14 + +These identifiers are used when :variable:`CMAKE__COMPILER_ID` is +``GHS``. + +``ARM`` + ARM 32-bit + +``PPC`` + PowerPC 32-bit + +``PPC64`` + PowerPC 64-bit + +``x64`` + Intel 64-bit + +``X86`` + Intel 32-bit + +IAR Platforms +^^^^^^^^^^^^^ + +.. versionadded:: 3.10 + +These identifiers are used when :variable:`CMAKE__COMPILER_ID` is +``IAR``. + +``8051`` + .. + +``ARM`` + .. + +``AVR`` + .. + +``MSP430`` + .. + +``RH850`` + .. + +``RISCV`` + .. + +``RL78`` + .. + +``RX`` + .. + +``STM8`` + .. + +``V850`` + .. + +TASKING Platforms +^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.25 + +These identifiers are used when :variable:`CMAKE__COMPILER_ID` is +``Tasking``. + +``8051`` + .. + +``ARC`` + .. + +``ARM`` + .. + +``MCS`` + .. + +``PCP`` + .. + +``TriCore`` + .. + +Texas Instruments Platforms +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.19 + +These identifiers are used when :variable:`CMAKE__COMPILER_ID` is +``TI``. + +``ARM`` + .. + +``Blackfin`` + .. + +``MSP430`` + .. + +``SHARC`` + .. + +``TMS320C28x`` + .. + +``TMS320C6x`` + ..