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

CMakeLists.txt issue when git is not installed or master.zip from github is used #62

Closed
std-any-emplace opened this issue Nov 20, 2020 · 4 comments · Fixed by #64
Closed

Comments

@std-any-emplace
Copy link

The supplied CMakeLists.txt fails if either git is not installed or the master.zip from github is used (and therefore the unpacked source does not contain a git repository).
Change the top to:

find_package(git QUIET)
if (git_FOUND)
  execute_process(
  COMMAND git rev-list --count HEAD
  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  OUTPUT_VARIABLE git_version
  OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
  set(git_version 0)
endif()

Setting git_version to 0 may not be the best solution, but at least it works.

@ArthurSonzogni
Copy link
Owner

Thanks! That's right. Do you want to send a pull request?

@std-any-emplace
Copy link
Author

TBH c&p is probably less a hassle...

@ArthurSonzogni
Copy link
Owner

ArthurSonzogni commented Nov 20, 2020 via email

@ArthurSonzogni
Copy link
Owner

Done. Thanks!

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 a pull request may close this issue.

2 participants