diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-11-26 13:47:22 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-11-26 13:50:25 (GMT) |
commit | 974220b714e63567bde9eccd459f58b213011d69 (patch) | |
tree | 491445bfc41c1cc3b748492e7bf0cc95fbd4a329 /Modules/CMakeCUDACompiler.cmake.in | |
parent | bb3d82232d06e553dedd430e6d7a1d0d917108dd (diff) | |
download | CMake-974220b714e63567bde9eccd459f58b213011d69.zip CMake-974220b714e63567bde9eccd459f58b213011d69.tar.gz CMake-974220b714e63567bde9eccd459f58b213011d69.tar.bz2 |
CUDA: persist CMAKE_LIBRARY_ARCHITECTURE and CUDA version
The CUDA language failed to persist CMAKE_CUDA_LIBRARY_ARCHITECTURE
and CMAKE_LIBRARY_ARCHITECTURE, causing find_ calls to fail when
the only enabled language was CUDA.
Diffstat (limited to 'Modules/CMakeCUDACompiler.cmake.in')
-rw-r--r-- | Modules/CMakeCUDACompiler.cmake.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index 711129a..e012abf 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -17,6 +17,11 @@ set(CMAKE_CUDA_SOURCE_FILE_EXTENSIONS cu) set(CMAKE_CUDA_LINKER_PREFERENCE 15) set(CMAKE_CUDA_LINKER_PREFERENCE_PROPAGATES 1) +set(CMAKE_CUDA_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") +if(CMAKE_CUDA_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") +endif() + set(CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES "@CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES@") set(CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES "@CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES@") |