1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Help: Demonstrate using set_target_properties with CUDA architectures

A common anti-pattern is to copy from the `CUDA_ARCHITECTURES` documentation.
If at any point the user tries to simplify by changin `set_property` to `set_target_properties` the code breaks.

To better train users, provide and example of how to set multiple
CUDA architectures with `set_target_properties`.
This commit is contained in:
Robert Maynard
2021-04-20 13:25:53 -04:00
parent 63ffe21036
commit e4ff2b51b9
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ Examples
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
set_target_properties(tgt PROPERTIES CUDA_ARCHITECTURES "35;50;72")
Generates code for real and virtual architectures ``30``, ``50`` and ``72``.

View File

@@ -25,7 +25,7 @@ Examples
.. code-block:: cmake
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 35 50 72)
set_target_properties(tgt PROPERTIES CUDA_ARCHITECTURES "35;50;72")
Generates code for real and virtual architectures ``30``, ``50`` and ``72``.