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 /Modules/CheckCompilerFlag.cmake | |
parent | c61f820a7fb1b191fe5591805f7e53fc52424f93 (diff) | |
download | cmake-da2622ff366e6089a98109c68ececac58d598b66.tar.gz |
CUDA: Add Support to SourceCompiles|Runs and CheckCompilerFlags
Diffstat (limited to 'Modules/CheckCompilerFlag.cmake')
-rw-r--r-- | Modules/CheckCompilerFlag.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CheckCompilerFlag.cmake b/Modules/CheckCompilerFlag.cmake index f2385d5e13..3ce1b9bd72 100644 --- a/Modules/CheckCompilerFlag.cmake +++ b/Modules/CheckCompilerFlag.cmake @@ -49,6 +49,10 @@ function(CHECK_COMPILER_FLAG _lang _flag _var) elseif(_lang STREQUAL CXX) set(_lang_src "int main() { return 0; }") set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+") + elseif(_lang STREQUAL CUDA) + set(_lang_src "__host__ int main() { return 0; }") + set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for C\\+\\+" # Host GNU + FAIL_REGEX "argument unused during compilation: .*") # Clang elseif(_lang STREQUAL Fortran) set(_lang_src " program test\n stop\n end program") set(_lang_fail_regex FAIL_REGEX "command[ -]line option .* is valid for .* but not for Fortran") |