diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-09-14 14:28:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-08 12:30:59 (GMT) |
commit | 5c66ac31e638dae7529e04064047722fca80ec01 (patch) | |
tree | 300bed80572511a9700b87e90eec808ad2abdd96 /Tests/RunCMake | |
parent | da2622ff366e6089a98109c68ececac58d598b66 (diff) | |
download | CMake-5c66ac31e638dae7529e04064047722fca80ec01.zip CMake-5c66ac31e638dae7529e04064047722fca80ec01.tar.gz CMake-5c66ac31e638dae7529e04064047722fca80ec01.tar.bz2 |
CUDA: CheckLinkerFlag now supports CUDA
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 68bd0d9..63738d7 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -555,7 +555,9 @@ add_RunCMake_test(CheckIPOSupported) if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)" AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU")) add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID} - -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}) + -DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID} + -DCMake_TEST_CUDA=${CMake_TEST_CUDA}) + set_property(TEST RunCMake.CheckLinkerFlag APPEND PROPERTY LABELS "CUDA") endif() diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake new file mode 100644 index 0000000..84d6dd9 --- /dev/null +++ b/Tests/RunCMake/CheckLinkerFlag/CheckCUDALinkerFlag.cmake @@ -0,0 +1,3 @@ + +set (CHECK_LANGUAGE CUDA) +include ("${CMAKE_CURRENT_SOURCE_DIR}/CheckLinkerFlag.cmake") diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake index 224a2a3..6ec9148 100644 --- a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake @@ -12,3 +12,7 @@ endif() if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU") run_cmake(CheckFortranLinkerFlag) endif() + +if (CMake_TEST_CUDA) + run_cmake(CheckCUDALinkerFlag) +endif() |