Shows the current BZR version in version.h, not the last in the repository (Nick Østergaard)

This commit is contained in:
Marco Serantoni 2013-12-28 12:29:20 +01:00
parent ca60f0863a
commit 5418a083d9
1 changed files with 8 additions and 1 deletions

View File

@ -30,8 +30,15 @@ macro( create_bzr_version_header )
set( _Bazaar_SAVED_LC_ALL "$ENV{LC_ALL}" ) set( _Bazaar_SAVED_LC_ALL "$ENV{LC_ALL}" )
set( ENV{LC_ALL} C ) set( ENV{LC_ALL} C )
# Get the tree revison
execute_process( COMMAND execute_process( COMMAND
${Bazaar_EXECUTABLE} log -r-1 ${PROJECT_SOURCE_DIR} ${Bazaar_EXECUTABLE} revno --tree ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE _bazaar_TREE_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Get more info about that revision
execute_process( COMMAND
${Bazaar_EXECUTABLE} log -r${_bazaar_TREE_DATE} ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE _bazaar_LAST_CHANGE_LOG OUTPUT_VARIABLE _bazaar_LAST_CHANGE_LOG
ERROR_VARIABLE _bazaar_log_error ERROR_VARIABLE _bazaar_log_error
RESULT_VARIABLE _bazaar_log_result RESULT_VARIABLE _bazaar_log_result