# CMake: properly detect when to rebuild zig1.o · gitcafe/zig

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

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

Visibility: public

Requested revision: 51ffb0548d84bca77dd17d9457ff7e42bd84cceb

Requested commit: 51ffb0548d84bca77dd17d9457ff7e42bd84cceb

Commit: 51ffb0548d84bca77dd17d9457ff7e42bd84cceb

Tree: efc085b49a28aba457cfa3986c0e3b6ebf0474c5

Author: johnLate

Committer: Andrew Kelley

## Message

```
CMake: properly detect when to rebuild zig1.o

This is andrewrk's patch from ziglang#6724 (rebased)

CMake: Fix dependency problem

I don't know whether the error was expected cmake behavior or a bug.
This change seems to fix the issue. See ziglang#6724 for details.

cmake: add the correct set of zig stage2 sources

```

## Parents

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

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