# cmake: install zig to 'build_dir/stage3' during building · gitcafe/zig

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

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

Visibility: public

Requested revision: 339cae7fd0af5730673fcba7d97568af24b5aa4f

Requested commit: 339cae7fd0af5730673fcba7d97568af24b5aa4f

Commit: 339cae7fd0af5730673fcba7d97568af24b5aa4f

Tree: db25ab71853a1b5a38a63a56968554868d3d9598

Author: Eric Joldasov

Committer: Andrew Kelley

## Message

```
cmake: install zig to 'build_dir/stage3' during building

This commit installs Zig to "build_dir/stage3" during building
so that distros' can easily find binary and use it for testing/etc.
This commit also splits "add_custom_target(stage3 ALL" and command that it invokes,
so that it won't retry it during installation,
as target will be considered not out-of-date.

See also https://www.github.com/ziglang/zig/issues/14240#issuecomment-1374642063

```

## Parents

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

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