From: Justin Lebar Date: Tue, 19 Apr 2016 18:52:28 +0000 (+0000) Subject: [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a535c806294ca22c3b153b16e355e442907b882;p=clang [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't found) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266796 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/cuda-not-found.cu b/test/Driver/cuda-not-found.cu new file mode 100644 index 0000000000..b63623ae56 --- /dev/null +++ b/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