summaryrefslogtreecommitdiffstats
path: root/Modules/CheckLinkerFlag.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-09-14 14:28:17 (GMT)
committerBrad King <brad.king@kitware.com>2020-10-08 12:30:59 (GMT)
commit5c66ac31e638dae7529e04064047722fca80ec01 (patch)
tree300bed80572511a9700b87e90eec808ad2abdd96 /Modules/CheckLinkerFlag.cmake
parentda2622ff366e6089a98109c68ececac58d598b66 (diff)
downloadCMake-5c66ac31e638dae7529e04064047722fca80ec01.zip
CMake-5c66ac31e638dae7529e04064047722fca80ec01.tar.gz
CMake-5c66ac31e638dae7529e04064047722fca80ec01.tar.bz2
CUDA: CheckLinkerFlag now supports CUDA
Diffstat (limited to 'Modules/CheckLinkerFlag.cmake')
-rw-r--r--Modules/CheckLinkerFlag.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CheckLinkerFlag.cmake b/Modules/CheckLinkerFlag.cmake
index 051e0bc..f56d365 100644
--- a/Modules/CheckLinkerFlag.cmake
+++ b/Modules/CheckLinkerFlag.cmake
@@ -66,6 +66,8 @@ function(CHECK_LINKER_FLAG _lang _flag _var)
set (_source "int main() { return 0; }")
elseif (_lang STREQUAL "Fortran")
set (_source " program test\n stop\n end program")
+ elseif (_lang MATCHES "CUDA")
+ set (_source "__host__ int main() { return 0; }")
elseif (_lang MATCHES "^(OBJC|OBJCXX)$")
set (_source "#ifndef __OBJC__\n# error \"Not an Objective-C++ compiler\"\n#endif\nint main(void) { return 0; }")
else()