diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-12-09 14:12:39 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-12-16 15:31:43 (GMT) |
commit | 12d324e55d0b47f442a147d8c2f93b1e6d7c2216 (patch) | |
tree | e6287ef4be25f809bd08ba77818813956bce03df /Modules/CMakeCUDACompiler.cmake.in | |
parent | 19f04031b6cbdddf52d4f25e79450d8413fff7ac (diff) | |
download | CMake-12d324e55d0b47f442a147d8c2f93b1e6d7c2216.zip CMake-12d324e55d0b47f442a147d8c2f93b1e6d7c2216.tar.gz CMake-12d324e55d0b47f442a147d8c2f93b1e6d7c2216.tar.bz2 |
CUDA: Persist SIZEOF_VOID_P and PLATFORM_ABI
The CUDA language failed to persist CMAKE_SIZEOF_VOID_P
and CMAKE_INTERNAL_PLATFORM_ABI, causing find_ calls to fail when
the only enabled language was CUDA. This specifically occurred
when having to locate libraries inside `lib64` directories.
Diffstat (limited to 'Modules/CMakeCUDACompiler.cmake.in')
-rw-r--r-- | Modules/CMakeCUDACompiler.cmake.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Modules/CMakeCUDACompiler.cmake.in b/Modules/CMakeCUDACompiler.cmake.in index ea491a9..4a615a3 100644 --- a/Modules/CMakeCUDACompiler.cmake.in +++ b/Modules/CMakeCUDACompiler.cmake.in @@ -11,7 +11,9 @@ set(CMAKE_CUDA14_COMPILE_FEATURES "@CMAKE_CUDA14_COMPILE_FEATURES@") set(CMAKE_CUDA17_COMPILE_FEATURES "@CMAKE_CUDA17_COMPILE_FEATURES@") set(CMAKE_CUDA20_COMPILE_FEATURES "@CMAKE_CUDA20_COMPILE_FEATURES@") +set(CMAKE_CUDA_PLATFORM_ID "@CMAKE_CUDA_PLATFORM_ID@") set(CMAKE_CUDA_SIMULATE_ID "@CMAKE_CUDA_SIMULATE_ID@") +set(CMAKE_CUDA_COMPILER_FRONTEND_VARIANT "@CMAKE_CUDA_COMPILER_FRONTEND_VARIANT@") set(CMAKE_CUDA_SIMULATE_VERSION "@CMAKE_CUDA_SIMULATE_VERSION@") @SET_MSVC_CUDA_ARCHITECTURE_ID@ @@ -24,7 +26,18 @@ set(CMAKE_CUDA_SOURCE_FILE_EXTENSIONS cu) set(CMAKE_CUDA_LINKER_PREFERENCE 15) set(CMAKE_CUDA_LINKER_PREFERENCE_PROPAGATES 1) +set(CMAKE_CUDA_SIZEOF_DATA_PTR "@CMAKE_CUDA_SIZEOF_DATA_PTR@") +set(CMAKE_CUDA_COMPILER_ABI "@CMAKE_CUDA_COMPILER_ABI@") set(CMAKE_CUDA_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") + +if(CMAKE_CUDA_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CUDA_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CUDA_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CUDA_COMPILER_ABI}") +endif() + if(CMAKE_CUDA_LIBRARY_ARCHITECTURE) set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_CUDA_LIBRARY_ARCHITECTURE@") endif() |