diff options
author | Raul Tambre <raul@tambre.ee> | 2022-01-15 19:23:55 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2022-01-15 19:51:21 (GMT) |
commit | ad6cd1074bff800857d6a72ce38dcd3962db1df2 (patch) | |
tree | 4ab5a83dbdf3535ad88b90063fbd540402abaa08 /Help | |
parent | d9a8744c50a180a1d8578baaeccf4e5f5f1986b4 (diff) | |
download | CMake-ad6cd1074bff800857d6a72ce38dcd3962db1df2.zip CMake-ad6cd1074bff800857d6a72ce38dcd3962db1df2.tar.gz CMake-ad6cd1074bff800857d6a72ce38dcd3962db1df2.tar.bz2 |
Help: Correct CUDAHOSTCXX and CUDAARCHS as having higher precedence
For CUDAHOSTCXX the behaviour seems to have been like this since the
introduction of it in commit 9cf5b98d ("CUDA: Prefer environment variables
CUDACXX and CUDAHOSTCXX.", 2016-11-08) and is likely unintentional judging by
the wording of the commit.
The documentation mistake seems to be a copy-paste error from when all the
environment variables were documented in commit e6b77c5f ("Help: Document
CMake's environment variables", 2017-09-01).
Describe this explicitly as it is unlike all other similar environment
variables.
For CUDAARCHS we got it wrong from the get-go in commit c4ae9384 ("CUDA:
Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}", 2020-11-24).
Correcting either to follow the more standard precedence behaviour will require
a policy.
Fixes #23081.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/envvar/CUDAARCHS.rst | 3 | ||||
-rw-r--r-- | Help/envvar/CUDAHOSTCXX.rst | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Help/envvar/CUDAARCHS.rst b/Help/envvar/CUDAARCHS.rst index 82369cd..e9e6a42 100644 --- a/Help/envvar/CUDAARCHS.rst +++ b/Help/envvar/CUDAARCHS.rst @@ -6,8 +6,7 @@ CUDAARCHS .. include:: ENV_VAR.txt Value used to initialize :variable:`CMAKE_CUDA_ARCHITECTURES` on the first -configuration if it's not already defined. Subsequent runs will use the value -stored in the cache. +configuration. Subsequent runs will use the value stored in the cache. This is a semicolon-separated list of architectures as described in :prop_tgt:`CUDA_ARCHITECTURES`. diff --git a/Help/envvar/CUDAHOSTCXX.rst b/Help/envvar/CUDAHOSTCXX.rst index cf65927..74f5d48 100644 --- a/Help/envvar/CUDAHOSTCXX.rst +++ b/Help/envvar/CUDAHOSTCXX.rst @@ -8,9 +8,8 @@ CUDAHOSTCXX Preferred executable for compiling host code when compiling ``CUDA`` language files. Will only be used by CMake on the first configuration to determine ``CUDA`` host compiler, after which the value for ``CUDAHOSTCXX`` is -stored in the cache as :variable:`CMAKE_CUDA_HOST_COMPILER`. For any -configuration run (including the first), the environment variable will be -ignored if the :variable:`CMAKE_CUDA_HOST_COMPILER` variable is defined. +stored in the cache as :variable:`CMAKE_CUDA_HOST_COMPILER`. This environment +variable is preferred over :variable:`CMAKE_CUDA_HOST_COMPILER`. This environment variable is primarily meant for use with projects that enable ``CUDA`` as a first-class language. |