diff options
| author | Robert Maynard <robert.maynard@kitware.com> | 2020-09-24 15:31:55 -0400 |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2020-10-08 08:30:59 -0400 |
| commit | da2622ff366e6089a98109c68ececac58d598b66 (patch) | |
| tree | 8205c6455c1c996ccb39d6270b8de385a92e78bb /Tests/CMakeOnly | |
| parent | c61f820a7fb1b191fe5591805f7e53fc52424f93 (diff) | |
| download | cmake-da2622ff366e6089a98109c68ececac58d598b66.tar.gz | |
CUDA: Add Support to SourceCompiles|Runs and CheckCompilerFlags
Diffstat (limited to 'Tests/CMakeOnly')
| -rw-r--r-- | Tests/CMakeOnly/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | Tests/CMakeOnly/CompilerIdCUDA/CMakeLists.txt | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt index 361cf5f2cc..a41b44ed92 100644 --- a/Tests/CMakeOnly/CMakeLists.txt +++ b/Tests/CMakeOnly/CMakeLists.txt @@ -38,6 +38,11 @@ if (APPLE AND CMAKE_C_COMPILER_ID MATCHES "Clang|GNU") add_CMakeOnly_test(CheckOBJCXXCompilerFlag) endif() +if(CMake_TEST_CUDA) + add_CMakeOnly_test(CompilerIdCUDA) +endif() + + if(CMAKE_Fortran_COMPILER) add_CMakeOnly_test(CompilerIdFortran) endif() diff --git a/Tests/CMakeOnly/CompilerIdCUDA/CMakeLists.txt b/Tests/CMakeOnly/CompilerIdCUDA/CMakeLists.txt new file mode 100644 index 0000000000..da14000249 --- /dev/null +++ b/Tests/CMakeOnly/CompilerIdCUDA/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.18) +project(CompilerIdCUDA CUDA) + +foreach(v + CMAKE_CUDA_COMPILER + CMAKE_CUDA_COMPILER_ID + CMAKE_CUDA_COMPILER_VERSION + ) + if(${v}) + message(STATUS "${v}=[${${v}}]") + else() + message(SEND_ERROR "${v} not set!") + endif() +endforeach() |
