ecmwf / ecbuild

A CMake-based build system, consisting of a collection of CMake macros and functions that ease the managing of software build systems
https://ecbuild.readthedocs.io
Apache License 2.0
26 stars 25 forks source link

Make generation of the *_GIT_SHA1 variables optional #21

Closed wsmigaj closed 4 years ago

wsmigaj commented 4 years ago

For projects in Git repositories, ecbuild generates variables recording the hash of the git revision at the time of the last build. This is no doubt useful in production, but it is awkward during development, since it causes CMake to be re-run after each Git commit, which can be time-consuming for large projects. This PR adds an option to disable generation of these variables.

As things stand, this option is not marked as advanced, but I'm happy to mark it as such.

FussyDuck commented 4 years ago

CLA assistant check
All committers have signed the CLA.

wsmigaj commented 4 years ago

Many thanks for the review. I will mark the option as advanced. I can also rename it, but the proposed name would clash with the name of the variable storing the full Git revision for an ecbuild project called RECORD_SOURCE. Do you think it is sufficiently unlikely that someone will create a project with that name?

oiffrig commented 4 years ago

Good point. Maybe RECORD_GIT_COMMIT_SHA1 then?

wdeconinck commented 4 years ago

How about ECBUILD_RECORD_GIT_COMMIT_SHA1 ?

wsmigaj commented 4 years ago

OK, I've renamed the option to ECBUILD_RECORD_GIT_COMMIT_SHA1 and marked it as advanced.