summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CheckLanguage.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CheckLanguage.cmake b/Modules/CheckLanguage.cmake
index 4c49d9a..04e721c 100644
--- a/Modules/CheckLanguage.cmake
+++ b/Modules/CheckLanguage.cmake
@@ -33,6 +33,14 @@ or :command:`project` commands:
If the check detects that no explicit host compiler is needed,
this variable will be cleared.
+ If this variable is already set, its value is preserved only if
+ :variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>` is also set.
+ Otherwise, the check runs and overwrites
+ :variable:`CMAKE_CUDA_HOST_COMPILER` with a new result.
+ Note that :variable:`CMAKE_CUDA_HOST_COMPILER` documents it should
+ not be set without also setting
+ :variable:`CMAKE_CUDA_COMPILER <CMAKE_<LANG>_COMPILER>` to a NVCC compiler.
+
For example:
.. code-block:: cmake