Closed aidanheerdegen closed 1 year ago
Tested this, and it does build ok outside a git
repo, but it will emit an error from git
and then set GIT_COMMIT_HASH
to an empty string.
Best to fix anyway to make behaviour explicit and not emit errors which can be confusing.
libaccessom2 has to build inside a
git
repository to create a git hash for versioninghttps://github.com/COSIMA/libaccessom2/blob/d750b4bfdc58c59490985c682c1b4c56cc1016b1/CMakeLists.txt#L120-L125
This is the same for MOM5 https://github.com/mom-ocean/MOM5/issues/308, which this PR is changing https://github.com/mom-ocean/MOM5/pull/384
For the same reasons as MOM5 it would be good to have the option of build libaccessom2 without needing to be in a git repo.