... | ... |
@@ -6,22 +6,31 @@ |
6 | 6 |
IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
7 | 7 |
INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
8 | 8 |
ELSEIF(DEFINED ENV{LEMON_VERSION}) |
9 | 9 |
SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.") |
10 | 10 |
ELSE() |
11 | 11 |
EXECUTE_PROCESS( |
12 |
COMMAND ./scripts/chg-len.py |
|
13 |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
|
14 |
OUTPUT_VARIABLE HG_REVISION_PATH |
|
15 |
ERROR_QUIET |
|
16 |
OUTPUT_STRIP_TRAILING_WHITESPACE |
|
17 |
) |
|
18 |
EXECUTE_PROCESS( |
|
12 | 19 |
COMMAND hg id -i |
13 | 20 |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
14 | 21 |
OUTPUT_VARIABLE HG_REVISION |
15 | 22 |
ERROR_QUIET |
16 | 23 |
OUTPUT_STRIP_TRAILING_WHITESPACE |
17 | 24 |
) |
18 | 25 |
IF(HG_REVISION STREQUAL "") |
19 |
SET( |
|
26 |
SET(HG_REVISION_ID "hg-tip") |
|
27 |
ELSE() |
|
28 |
SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION}) |
|
20 | 29 |
ENDIF() |
21 |
SET(LEMON_VERSION ${ |
|
30 |
SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.") |
|
22 | 31 |
ENDIF() |
23 | 32 |
|
24 | 33 |
SET(PROJECT_VERSION ${LEMON_VERSION}) |
25 | 34 |
|
26 | 35 |
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) |
27 | 36 |
|
0 comments (0 inline)