Skip to content

GetGitVersion fails when cmake is executed #589

@php1ic

Description

@php1ic

When you run cmake to configure a build and are in a separate build directory, the default version of the project is shown, rather than the current one.

[~/git_repos/google/build]$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOME}/git_repos/google/install/ ../benchmark/
.
.
.
-- Failed to find LLVM FileCheck
-- git Version: v0.0.0
-- Version: 0.0.0
.
.

The problem looks to be in cmake/GetGitVersion.cmake file as it expects to be run from the source directory.

I can see how to fix it, so will work on it and issue a pull-request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions