Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version detection for out-of-source builds #1177

Merged
merged 1 commit into from Jun 30, 2018

Conversation

jayschwa
Copy link
Sponsor Contributor

Git was called in the build directory and not the source directory.
This works fine when the build directory resides within the source
repository, but doesn't work for out-of-source builds. Example:

~/zigbuild$ cmake ../zig
fatal: not a git repository (or any of the parent directories): .git
Configuring zig version 0.2.0+

Use Git's -C <path> flag to always point to the source directory so
that it doesn't matter where the build directory lives.

Git was called in the build directory and not the source directory.
This works fine when the build directory resides within the source
repository, but doesn't work for out-of-source builds. Example:

```
~/zigbuild$ cmake ../zig
fatal: not a git repository (or any of the parent directories): .git
Configuring zig version 0.2.0+
```

Use Git's `-C <path>` flag to always point to the source directory so
that it doesn't matter where the build directory lives.
Copy link
Contributor

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@andrewrk andrewrk merged commit 3f4b77f into ziglang:master Jun 30, 2018
@jayschwa jayschwa deleted the fix-out-of-src-builds branch June 30, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants