Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ziglang/zig
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 887c97742f86
Choose a base ref
...
head repository: ziglang/zig
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3f4b77f56132
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 30, 2018

  1. Fix version detection for out-of-source builds

    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.
    jayschwa committed Jun 30, 2018
    Copy the full SHA
    25bbb1a View commit details
  2. Merge pull request #1177 from jayschwa/fix-out-of-src-builds

    Fix version detection for out-of-source builds
    andrewrk authored Jun 30, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3f4b77f View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 CMakeLists.txt
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ set(ZIG_VERSION "${ZIG_VERSION_MAJOR}.${ZIG_VERSION_MINOR}.${ZIG_VERSION_PATCH}"
find_program(GIT_EXE NAMES git)
if(GIT_EXE)
execute_process(
COMMAND ${GIT_EXE} name-rev HEAD --tags --name-only --no-undefined --always
COMMAND ${GIT_EXE} -C ${CMAKE_SOURCE_DIR} name-rev HEAD --tags --name-only --no-undefined --always
OUTPUT_VARIABLE ZIG_GIT_REV
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(ZIG_GIT_REV MATCHES "\\^0$")