E3SM-Project / HOMMEXX

Clone of ACME for CMDV-SE project to convert HOMME to C++
11 stars 0 forks source link

Fix #271 by printing HOMMEXX SHA1 at startup. #284

Closed ambrad closed 6 years ago

mfdeakin-sandia commented 6 years ago

Actually, thinking about this a little more, it's not clear to me that this actually does everything we want. Specifically, in the case that I configure on one commit, add new commits which don't touch the CMake, and then build again.

ambrad commented 6 years ago

Feel free to improve it with another PR. IMO, running git at config time is appropriate, while somehow forcing it to run each time someone builds is a bit intrusive. Perhaps there is a way to be assured of the right sha1 w/o reconfig that I'm not thinking of.

ambrad commented 6 years ago

A git hook that commits a sha1 header file with each commit would solve the problem at the granularity that Michael describes.

oksanaguba commented 6 years ago

if i understand this right, i agree with Michael, cause that's behavior i observed before. there was a case when build folder would contain older commit that the source folder after rebuild.

bartgol commented 6 years ago

I get Micheal's concern but I'm reluctant at running external commands at build time. I don't want to run git-related commands every time I build. A git-sha header file would probably do. A git post-recv hook that 'touches' a CMake file would probably do too, without adding a file to the library.

That said, I'm not really concerned about this, so whatever solution you guys agree on, will do for me.