Skip to content

Commit 3be8801

Browse files
author
Samuel Antao
committedAug 9, 2016
[CUDA] Regression test to make sure C++ include path are forwarded to host and device frontends.
Summary: Add test to detect the C++ include paths are passed to both CUDA host and device frontends. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22946 llvm-svn: 278140
1 parent bab5a5d commit 3be8801

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎clang/test/Driver/cuda-detect.cu

+10
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
// RUN: | FileCheck %s -check-prefix COMMON \
7373
// RUN: -check-prefix NOCUDAINC -check-prefix NOLIBDEVICE
7474

75+
// Verify that C++ include paths are passed for both host and device frontends.
76+
// RUN: %clang -### -target x86_64-linux-gnu %s \
77+
// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 2>&1 \
78+
// RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE
79+
7580
// CHECK: Found CUDA installation: {{.*}}/Inputs/CUDA/usr/local/cuda
7681
// NOCUDA-NOT: Found CUDA installation:
7782

@@ -92,3 +97,8 @@
9297
// CUDAINC-SAME: "-include" "__clang_cuda_runtime_wrapper.h"
9398
// NOCUDAINC-NOT: "-include" "__clang_cuda_runtime_wrapper.h"
9499
// COMMON-SAME: "-x" "cuda"
100+
// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "nvptx64-nvidia-cuda"
101+
// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
102+
// CHECK-CXXINCLUDE: clang{{.*}} "-cc1" "-triple" "x86_64--linux-gnu"
103+
// CHECK-CXXINCLUDE-SAME: {{.*}}"-internal-isystem" "{{.+}}/include/c++/4.8"
104+
// CHECK-CXXINCLUDE: ld{{.*}}"

0 commit comments

Comments
 (0)
Please sign in to comment.