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

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

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

Visibility: public

Requested revision: 922d33e5b9195587afa4e97cd60c0af0212938bd

Requested commit: 922d33e5b9195587afa4e97cd60c0af0212938bd

Commit: 922d33e5b9195587afa4e97cd60c0af0212938bd

Tree: 868c2f8f0eda6c4b9868d8d9ff3b7f335986c2d6

Author: Daniel Saier

Committer: Andrew Kelley

## 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

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

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