1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-28 00:00:18 +01:00

Ease CMake and legacy build coexistence

Cliff noticed that the CMake git ident was not being updated when
pulling new changes.  This was because it was getting captured at
configuration time and, even if you pull more changes, the CMake
configuration may not be redone automatically if the build files
weren't also changed.

So, this adds a new target to get the information at build time
instead.
This commit is contained in:
Leland Lucius
2020-03-11 22:31:19 -05:00
parent 9d4082d7f1
commit 66aae0900b
3 changed files with 38 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
# Executed during build (NOT configuration) to create/update the
# RevisionIdent.h header. It will only update it if there was
# a change in git.
execute_process(
COMMAND
${GIT} show -s "--format=#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n%n"
OUTPUT_FILE
RevisionIdent.h.in
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
COMMAND_ECHO STDOUT
)
configure_file( RevisionIdent.h.in RevisionIdent.h COPYONLY )