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

get_git_head_revision() fails due to unfound git #72

Open
multiplemonomials opened this issue Dec 10, 2021 · 1 comment
Open

get_git_head_revision() fails due to unfound git #72

multiplemonomials opened this issue Dec 10, 2021 · 1 comment

Comments

@multiplemonomials
Copy link

multiplemonomials commented Dec 10, 2021

I was seeing an error like this (anonymized):

CMake Error: File XXX/MyProject/SubmodulesInThisDir/.git/modules/SubmodulesInThisDir/Submodule/HEAD does not exist.
CMake Error at SubmodulesInThisDir/Submodule/cmake/GetGitRevisionDescription.cmake:161 (configure_file):
  configure_file Problem configuring file

Finally tracked it down to the fact that, for some reason, the get_git_head_revision() function of GetGitRevisionDescription does not include the

    if(NOT GIT_FOUND)
        find_package(Git QUIET)
    endif()

block that all the other public functions have. So, if this is the first GetGitRevisionDescription function you call, it takes the wrong code paths due to the inability to call Git and tries to configure the wrong file.

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

No branches or pull requests

2 participants
@multiplemonomials and others