diff options
author | Brad King <brad.king@kitware.com> | 2019-06-26 11:41:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-26 12:36:48 (GMT) |
commit | 8fbd25772f7db4c6f152a28b0050e6b263951049 (patch) | |
tree | 68e34a9a455b5236bca8e3af165482f2039fa5fa /Tests/MSVCRuntimeLibrary | |
parent | 07807a20060b4e9561239d8b26ebbb4f38b7c7f3 (diff) | |
download | CMake-8fbd25772f7db4c6f152a28b0050e6b263951049.zip CMake-8fbd25772f7db4c6f152a28b0050e6b263951049.tar.gz CMake-8fbd25772f7db4c6f152a28b0050e6b263951049.tar.bz2 |
CUDA: Implement MSVC runtime library abstraction
In commit fb3370b6a1 (MSVC: Add abstraction for runtime library
selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags
for CUDA on Windows, where nvcc uses MSVC as the host compiler. Add
them now and update the MSVCRuntimeLibrary test to cover CUDA.
Fixes: #19428
Diffstat (limited to 'Tests/MSVCRuntimeLibrary')
-rw-r--r-- | Tests/MSVCRuntimeLibrary/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/MSVCRuntimeLibrary/verify.cu | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/MSVCRuntimeLibrary/CMakeLists.txt b/Tests/MSVCRuntimeLibrary/CMakeLists.txt index 6994d8d..f7d9fec 100644 --- a/Tests/MSVCRuntimeLibrary/CMakeLists.txt +++ b/Tests/MSVCRuntimeLibrary/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.14) cmake_policy(SET CMP0091 NEW) project(MSVCRuntimeLibrary) +if(CMake_TEST_CUDA) + enable_language(CUDA) +endif() + function(verify_combinations threads lang src) set(verify_tc_config_ Release) set(verify_tc_config_Debug Debug) @@ -62,3 +66,6 @@ endfunction() verify(C verify.c) verify(CXX verify.cxx) +if(CMake_TEST_CUDA) + verify(CUDA verify.cu) +endif() diff --git a/Tests/MSVCRuntimeLibrary/verify.cu b/Tests/MSVCRuntimeLibrary/verify.cu new file mode 100644 index 0000000..741bca6 --- /dev/null +++ b/Tests/MSVCRuntimeLibrary/verify.cu @@ -0,0 +1 @@ +#include "verify.h" |