equal
deleted
inserted
replaced
13 set(HW_DEV true) |
13 set(HW_DEV true) |
14 IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) |
14 IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg) |
15 FIND_PROGRAM(HGCOMMAND hg) |
15 FIND_PROGRAM(HGCOMMAND hg) |
16 IF(HGCOMMAND) |
16 IF(HGCOMMAND) |
17 exec_program(${HGCOMMAND} |
17 exec_program(${HGCOMMAND} |
18 ARGS identify ${CMAKE_CURRENT_SOURCE_DIR} |
18 ARGS identify -in ${CMAKE_CURRENT_SOURCE_DIR} |
19 OUTPUT_VARIABLE version_suffix |
19 OUTPUT_VARIABLE version_suffix |
20 ) |
20 ) |
21 STRING(REGEX REPLACE "(.*) +.*" "\\1" version_suffix ${version_suffix}) |
21 STRING(REGEX REPLACE "(.*) +(.*)" "\\2:\\1" version_suffix ${version_suffix}) |
22 MESSAGE(STATUS "Builing revision ${version_suffix}") |
22 MESSAGE(STATUS "Builing revision ${version_suffix}") |
23 set(version_suffix ".${version_suffix}") |
23 set(version_suffix ".${version_suffix}") |
24 # #truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019 |
24 # #truncate to numbers only - trying to fix a problem described in http://www.hedgewars.org/node/2019 |
25 # STRING(REGEX REPLACE "^\\.(\\d+)" ".\\1" version_suffix ${version_suffix}) |
25 # STRING(REGEX REPLACE "^\\.(\\d+)" ".\\1" version_suffix ${version_suffix}) |
26 # # screw whole suffix if there's no number |
26 # # screw whole suffix if there's no number |