Printing git version from my deal.ii-based code

45 views
Skip to first unread message

Praveen C

unread,
Jul 1, 2021, 5:15:33 AM7/1/21
to Deal. II Googlegroup
Dear all

I have my deal.II based application code under git.

Is there a way to print the git version from my deal.II code ?

Something like this

https://github.com/smessmer/gitversion

but I couldnt get that to work. My knowledge of cmake almost zero. Any suggestions ?

Best
praveen

peterrum

unread,
Jul 1, 2021, 5:22:05 AM7/1/21
to deal.II User Group

Praveen C

unread,
Jul 1, 2021, 5:26:58 AM7/1/21
to Deal. II Googlegroup
Thanks a lot. That gives me the deal.II git version.

Is there a way to put the git version of my application code also ?

I suppose this has to be done to cmake stage I suppose.

Thanks
praveen

peterrum

unread,
Jul 1, 2021, 5:30:59 AM7/1/21
to deal.II User Group
I am doing in a project like this: https://github.com/hyperdeal/hyperdeal/blob/0d1529484306b034e442d79ab85ae7dbe8815e63/CMakeLists.txt#L61-L67. But I can imagine that there are better approaches.

PM

Praveen C

unread,
Jul 2, 2021, 1:17:38 AM7/2/21
to Deal. II Googlegroup
Thank you, this is exactly what I wanted.
Reply all
Reply to author
Forward
0 new messages