diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckCompilerFlag.cmake | 4 | ||||
-rw-r--r-- | Modules/CheckSourceCompiles.cmake | 3 | ||||
-rw-r--r-- | Modules/CheckSourceRuns.cmake | 3 |
3 files changed, 10 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") diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake index 70a733d32a..08fc153499 100644 --- a/Modules/CheckSourceCompiles.cmake +++ b/Modules/CheckSourceCompiles.cmake @@ -89,6 +89,9 @@ function(CHECK_SOURCE_COMPILES _lang _source _var) elseif(_lang STREQUAL CXX) set(_lang_textual "C++") set(_lang_ext "cxx") + elseif(_lang STREQUAL CUDA) + set(_lang_textual "CUDA") + set(_lang_ext "cu") elseif(_lang STREQUAL Fortran) set(_lang_textual "Fortran") set(_lang_ext "F") diff --git a/Modules/CheckSourceRuns.cmake b/Modules/CheckSourceRuns.cmake index 61651231aa..20f3e1e09f 100644 --- a/Modules/CheckSourceRuns.cmake +++ b/Modules/CheckSourceRuns.cmake @@ -87,6 +87,9 @@ function(CHECK_SOURCE_RUNS _lang _source _var) elseif(_lang STREQUAL CXX) set(_lang_textual "C++") set(_lang_ext "cxx") + elseif(_lang STREQUAL CUDA) + set(_lang_textual "CUDA") + set(_lang_ext "cu") elseif(_lang STREQUAL Fortran) set(_lang_textual "Fortran") set(_lang_ext "F") |