diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-04-20 17:25:53 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-04-20 17:25:53 (GMT) |
commit | e4ff2b51b95d26dcfb70f0351328d1a285c22800 (patch) | |
tree | 8cf53c4d51aa65fd95f51d055e3be610bd82dfb0 | |
parent | 63ffe210365ce2d1dd67fcabcc67e20913f320a8 (diff) | |
download | CMake-e4ff2b51b95d26dcfb70f0351328d1a285c22800.zip CMake-e4ff2b51b95d26dcfb70f0351328d1a285c22800.tar.gz CMake-e4ff2b51b95d26dcfb70f0351328d1a285c22800.tar.bz2 |
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`.
-rw-r--r-- | Help/policy/CMP0104.rst | 2 | ||||
-rw-r--r-- | Help/prop_tgt/CUDA_ARCHITECTURES.rst | 2 |
2 files changed, 2 insertions, 2 deletions
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 @@ 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``. 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 @@ 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``. |