1 | // 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 --cuda-path-ignore-env %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 --cuda-path-ignore-env %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 |
13 | |