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`.
diff --git a/Help/policy/CMP0104.rst b/Help/policy/CMP0104.rst
index 7c7a16e..b125729 100644
--- a/Help/policy/CMP0104.rst
+++ b/Help/policy/CMP0104.rst
@@ -41,7 +41,7 @@
.. 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``.
diff --git a/Help/prop_tgt/CUDA_ARCHITECTURES.rst b/Help/prop_tgt/CUDA_ARCHITECTURES.rst
index d56b769..a3191e8 100644
--- a/Help/prop_tgt/CUDA_ARCHITECTURES.rst
+++ b/Help/prop_tgt/CUDA_ARCHITECTURES.rst
@@ -25,7 +25,7 @@
.. 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``.