Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commithash of the kxml_compiler to the generated file's comment section #27

Open
martonmiklos opened this issue Dec 6, 2019 · 1 comment
Assignees
Labels
kxml_compiler kxml_compiler

Comments

@martonmiklos
Copy link
Collaborator

Sometimes it would be great to know from a generated parser/generator, that which version of the kxml_compiler generated it, so it would be useful to generate this to the heading comments.

On bash based envs we could borrow the getrevision.sh from the flashrom for this purpose:
https://github.com/flashrom/flashrom/blob/master/util/getrevision.sh

On Windows we would need to came up with a batchfile.

@martonmiklos martonmiklos added the kxml_compiler kxml_compiler label Dec 6, 2019
@martonmiklos martonmiklos self-assigned this Jan 12, 2020
@winterheart
Copy link
Contributor

Hi.
This can be achieved with Git module and add_custom_command in CMake. In QMake it would be

GIT_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)

but I prefer dynamic file version.h generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kxml_compiler kxml_compiler
Projects
None yet
Development

No branches or pull requests

2 participants