diff options
author | Raul Tambre <raul@tambre.ee> | 2020-03-08 14:34:10 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2020-03-11 19:30:09 (GMT) |
commit | f75bea1071859a74f170f45beb7651dcba1ab18a (patch) | |
tree | c2f6ef28a8d50f733a1a68576e79dd3a6581cd65 /Modules/Compiler | |
parent | c7c6e103d1209f7e29cb2909cf342be75478f304 (diff) | |
download | CMake-f75bea1071859a74f170f45beb7651dcba1ab18a.zip CMake-f75bea1071859a74f170f45beb7651dcba1ab18a.tar.gz CMake-f75bea1071859a74f170f45beb7651dcba1ab18a.tar.bz2 |
CUDA: Abstract language flag to compiler modules
Separate this detail out into compiler-specific modules.
Required for Clang support, as it uses slightly different language flags.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/NVIDIA-CUDA.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index 1f4d54d..2a2564e 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -4,6 +4,8 @@ set(CMAKE_CUDA_COMPILER_HAS_DEVICE_LINK_PHASE True) set(CMAKE_CUDA_VERBOSE_FLAG "-v") set(CMAKE_CUDA_VERBOSE_COMPILE_FLAG "-Xcompiler=-v") +set(_CMAKE_COMPILE_AS_CUDA_FLAG "-x cu") + if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2.89) # The -forward-unknown-to-host-compiler flag was only # added to nvcc in 10.2 so before that we had no good |