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:
16
cmake-proxies/cmake-modules/Version.cmake
Normal file
16
cmake-proxies/cmake-modules/Version.cmake
Normal 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 )
|
||||
|
||||
Reference in New Issue
Block a user