blob: b63623ae56c1f8c1d748788367d66518575e8fe1 [file] [log] [blame]
Justin Lebarb34d7bc2016-04-19 18:52:28 +00001// REQUIRES: clang-driver
2
3// Check that we raise an error if we're trying to compile CUDA code but can't
4// find a CUDA install, unless -nocudainc was passed.
5
6// RUN: %clang -### --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR
7// RUN: %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR
8// ERR: cannot find CUDA installation
9
10// RUN: %clang -### -nocudainc --sysroot=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK
11// RUN: %clang -### -nocudainc --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK
12// OK-NOT: cannot find CUDA installation