computationalgeography / lue

LUE Scientific Database and Environmental Modelling Framework
https://lue.computationalgeography.org
MIT License
12 stars 4 forks source link

Git comit sha1 logic does not work if there's no `.git` subdir in source directory #487

Open kordejong opened 2 years ago

kordejong commented 2 years ago

This results in compilation failure, because LUE_GIT_SHA1 won't be defined.

Being able to build with a .git subdir is useful in case the source directory is not a clone of the repository. The zips created by GH upon releasing a version don't include the .git subdir, for example. Ideally, the Conda build used these.

kordejong commented 2 years ago

See also https://github.com/andrew-hardin/cmake-git-version-tracking. There may be other solutions as well.

kordejong commented 2 years ago

Current solution results in more rebuilds then needed. See alternative solution mentioned in previous comment for a way to improve this.