summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-06-09 15:20:41 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-09 16:34:39 (GMT)
commit414438b2fb5a43c447273b425b59cd982818457b (patch)
tree191e35f5092f645b9a56178c2f3fcbf37be06480 /Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
parent591557ba450f1f24610ea0eefcb4e1d7665fae25 (diff)
downloadCMake-414438b2fb5a43c447273b425b59cd982818457b.zip
CMake-414438b2fb5a43c447273b425b59cd982818457b.tar.gz
CMake-414438b2fb5a43c447273b425b59cd982818457b.tar.bz2
CUDA: Add option to run the compiler through launcher tools
Add a `CUDA_COMPILER_LAUNCHER` target property like those added for C and CXX by commit v3.4.0-rc1~450^2 (Add options to launch the compiler through tools like ccache or distcc, 2015-06-04). Fixes: #16953
Diffstat (limited to 'Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
index 5884d5c..ab26512 100644
--- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake
@@ -15,9 +15,14 @@ function(run_compiler_launcher lang)
run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args})
endfunction()
-run_compiler_launcher(C)
-run_compiler_launcher(CXX)
-if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
- run_compiler_launcher(C-launch)
- run_compiler_launcher(CXX-launch)
+set(langs C CXX)
+if(CMake_TEST_CUDA)
+ list(APPEND langs CUDA)
endif()
+
+foreach(lang ${langs})
+ run_compiler_launcher(${lang})
+ if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
+ run_compiler_launcher(${lang}-launch)
+ endif()
+endforeach()