diff options
author | Brad King <brad.king@kitware.com> | 2018-04-24 14:09:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-24 14:09:36 (GMT) |
commit | bff4651f2e077350d1c8b691d9fce5dd57bb6f69 (patch) | |
tree | f86bf48be751caec326a615c924dd81141b3376c /Modules/CMakeDetermineCUDACompiler.cmake | |
parent | 3db40923295a6430eb957a3cf6826bbb18a78527 (diff) | |
download | CMake-bff4651f2e077350d1c8b691d9fce5dd57bb6f69.zip CMake-bff4651f2e077350d1c8b691d9fce5dd57bb6f69.tar.gz CMake-bff4651f2e077350d1c8b691d9fce5dd57bb6f69.tar.bz2 |
CUDA: Do not create CMAKE_CUDA_HOST_COMPILER cache entry
Users can create it through an explicit command-line option if desired.
Initializing the variable as an empty cache entry can wipe out a normal
variable of the same name that may have been set by a toolchain file.
Since commit v3.8.0-rc1~261^2~11 (CUDA: Use the host compiler for
linking CUDA executables and shared libs, 2016-09-19) we save the value
of `CMAKE_CUDA_HOST_COMPILER` persistently in the compiler information
file as a normal variable.
Fixes: #17935
Diffstat (limited to 'Modules/CMakeDetermineCUDACompiler.cmake')
-rw-r--r-- | Modules/CMakeDetermineCUDACompiler.cmake | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 0b8fff6..113b520 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -40,7 +40,6 @@ else() endif() #Allow the user to specify a host compiler -set(CMAKE_CUDA_HOST_COMPILER "" CACHE FILEPATH "Host compiler to be used by nvcc") if(NOT $ENV{CUDAHOSTCXX} STREQUAL "") get_filename_component(CMAKE_CUDA_HOST_COMPILER $ENV{CUDAHOSTCXX} PROGRAM) if(NOT EXISTS ${CMAKE_CUDA_HOST_COMPILER}) |