diff options
| author | Justin Lebar <jlebar@google.com> | 2016-04-19 18:52:28 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-04-19 18:52:28 +0000 |
| commit | b34d7bc9a19367498e9ad222f93f266912e81bae (patch) | |
| tree | 8522173e5bb4134a6ac05344bd7a051e86a24e04 /clang | |
| parent | 5a783d0a1f610e5a216a42cca168f55165fc720b (diff) | |
| download | bcm5719-llvm-b34d7bc9a19367498e9ad222f93f266912e81bae.tar.gz bcm5719-llvm-b34d7bc9a19367498e9ad222f93f266912e81bae.zip | |
[CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found)
llvm-svn: 266796
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/Driver/cuda-not-found.cu | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Driver/cuda-not-found.cu b/clang/test/Driver/cuda-not-found.cu new file mode 100644 index 00000000000..b63623ae56c --- /dev/null +++ b/clang/test/Driver/cuda-not-found.cu @@ -0,0 +1,12 @@ +// REQUIRES: clang-driver + +// Check that we raise an error if we're trying to compile CUDA code but can't +// find a CUDA install, unless -nocudainc was passed. + +// RUN: %clang -### --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR +// ERR: cannot find CUDA installation + +// RUN: %clang -### -nocudainc --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK +// RUN: %clang -### -nocudainc --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK +// OK-NOT: cannot find CUDA installation |

