# HG changeset patch # User Akos Ladanyi # Date 1282766560 -7200 # Node ID e74b5db4f2c65b830730864ea94f956100f39e0a # Parent e20fecd1945f0d5ac2a82b79a0e7d794de4e6cd9 Put the output of chg-len.py in the version string (#389) diff -r e20fecd1945f -r e74b5db4f2c6 CMakeLists.txt --- a/CMakeLists.txt Wed Aug 25 21:34:58 2010 +0200 +++ b/CMakeLists.txt Wed Aug 25 22:02:40 2010 +0200 @@ -9,6 +9,13 @@ SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.") ELSE() EXECUTE_PROCESS( + COMMAND ./scripts/chg-len.py + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + OUTPUT_VARIABLE HG_REVISION_PATH + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + EXECUTE_PROCESS( COMMAND hg id -i WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE HG_REVISION @@ -16,9 +23,11 @@ OUTPUT_STRIP_TRAILING_WHITESPACE ) IF(HG_REVISION STREQUAL "") - SET(HG_REVISION "hg-tip") + SET(HG_REVISION_ID "hg-tip") + ELSE() + SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION}) ENDIF() - SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.") + SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.") ENDIF() SET(PROJECT_VERSION ${LEMON_VERSION})