diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-08-28 19:03:39 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2021-06-07 19:25:33 (GMT) |
commit | b50bfc89131e55685aa41146254b37d26049b4d5 (patch) | |
tree | e6ed45ba63b75decf4c9436fac6139174850370b /Help/prop_tgt | |
parent | ff0d2858e1e47af8e849318b411b1fbd8579a053 (diff) | |
download | CMake-b50bfc89131e55685aa41146254b37d26049b4d5.zip CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.gz CMake-b50bfc89131e55685aa41146254b37d26049b4d5.tar.bz2 |
HIP: Add language to CMake
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/HIP_ARCHITECTURES.rst | 26 | ||||
-rw-r--r-- | Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/Help/prop_tgt/HIP_ARCHITECTURES.rst b/Help/prop_tgt/HIP_ARCHITECTURES.rst new file mode 100644 index 0000000..052f472 --- /dev/null +++ b/Help/prop_tgt/HIP_ARCHITECTURES.rst @@ -0,0 +1,26 @@ +HIP_ARCHITECTURES +----------------- + +.. versionadded:: 3.21 + +List of AMD GPU architectures to generate device code for. + +An empty or false value (e.g. ``OFF``) defers architecture generation to compiler +defaults. + +This property is initialized by the value of the :variable:`CMAKE_HIP_ARCHITECTURES` +variable if it is set when a target is created. + +The HIP compilation model has two modes: whole and separable. Whole compilation +generates device code at compile time. Separable compilation generates device +code at link time. Therefore the ``HIP_ARCHITECTURES`` target property should +be set on targets that compile or link with any HIP sources. + +Examples +^^^^^^^^ + +.. code-block:: cmake + + set_property(TARGET tgt PROPERTY HIP_ARCHITECTURES gfx801 gfx900) + +Generates code for both ``gfx801`` and ``gfx900``. diff --git a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst index 16be3cd..cba8ac9 100644 --- a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst +++ b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst @@ -4,7 +4,7 @@ .. versionadded:: 3.4 This property is implemented only when ``<LANG>`` is ``C``, ``CXX``, -``Fortran``, ``ISPC``, ``OBJC``, ``OBJCXX``, or ``CUDA``. +``Fortran``, ``HIP``, ``ISPC``, ``OBJC``, ``OBJCXX``, or ``CUDA``. Specify a :ref:`semicolon-separated list <CMake Language Lists>` containing a command line for a compiler launching tool. The :ref:`Makefile Generators` and the |