1.1 --- a/CMakeLists.txt Wed Aug 25 21:34:58 2010 +0200
1.2 +++ b/CMakeLists.txt Wed Aug 25 22:02:40 2010 +0200
1.3 @@ -9,6 +9,13 @@
1.4 SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
1.5 ELSE()
1.6 EXECUTE_PROCESS(
1.7 + COMMAND ./scripts/chg-len.py
1.8 + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
1.9 + OUTPUT_VARIABLE HG_REVISION_PATH
1.10 + ERROR_QUIET
1.11 + OUTPUT_STRIP_TRAILING_WHITESPACE
1.12 + )
1.13 + EXECUTE_PROCESS(
1.14 COMMAND hg id -i
1.15 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
1.16 OUTPUT_VARIABLE HG_REVISION
1.17 @@ -16,9 +23,11 @@
1.18 OUTPUT_STRIP_TRAILING_WHITESPACE
1.19 )
1.20 IF(HG_REVISION STREQUAL "")
1.21 - SET(HG_REVISION "hg-tip")
1.22 + SET(HG_REVISION_ID "hg-tip")
1.23 + ELSE()
1.24 + SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION})
1.25 ENDIF()
1.26 - SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
1.27 + SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.")
1.28 ENDIF()
1.29
1.30 SET(PROJECT_VERSION ${LEMON_VERSION})