cmake-proxies/cmake-modules/Version.cmake
raw| 1 | # Executed during build (NOT configuration) to create/update the |
| 2 | # RevisionIdent.h header. It will only update it if there was |
| 3 | # a change in git. |
| 4 | |
| 5 | execute_process( |
| 6 | COMMAND |
| 7 | ${GIT} show -s "--format=#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" |
| 8 | OUTPUT_FILE |
| 9 | ${_PRVDIR}/RevisionIdent.h.in |
| 10 | OUTPUT_STRIP_TRAILING_WHITESPACE |
| 11 | ERROR_QUIET |
| 12 | ) |
| 13 | |
| 14 | configure_file( ${_PRVDIR}/RevisionIdent.h.in ${_PRVDIR}/RevisionIdent.h COPYONLY ) |
| 15 |