# zig cc: Treat cu files as C\+\+ source files · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/2f41bd3be438dae2a188cfae3295dc28f4e9d434)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 2f41bd3be438dae2a188cfae3295dc28f4e9d434

Requested commit: 2f41bd3be438dae2a188cfae3295dc28f4e9d434

Commit: 2f41bd3be438dae2a188cfae3295dc28f4e9d434

Tree: ee5a10c3a7de2ae9d86a743187a7d77b94ebd6ca

Author: Daniel Saier

Committer: Veikka Tuominen

## Message

```
zig cc: Treat cu files as C++ source files

First step towards #10634.

Treating stub files as C++ allows to use zig c++ as a host
compiler for nvcc.

Treating cu files as C++ allow using zig c++ as a host compiler in
CMake. CMake calls the host compiler with -E on a cu file to identify
the compiler.

Using zig c++ to directly compile CUDA code is untested.

```

## Parents

- [35423b005440c9f31a4cc6a53ccf6b7edd08b859](https://git.cafe/gitcafe/zig/commit/35423b005440c9f31a4cc6a53ccf6b7edd08b859?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/2f41bd3be438dae2a188cfae3295dc28f4e9d434?format=markdown)
