... | ... |
@@ -6,24 +6,27 @@ |
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 | 12 |
COMMAND hg id -i |
13 | 13 |
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
14 | 14 |
OUTPUT_VARIABLE HG_REVISION |
15 | 15 |
ERROR_QUIET |
16 | 16 |
OUTPUT_STRIP_TRAILING_WHITESPACE |
17 | 17 |
) |
18 |
IF(HG_REVISION STREQUAL "") |
|
19 |
SET(HG_REVISION "hg-tip") |
|
20 |
ENDIF() |
|
18 | 21 |
SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.") |
19 | 22 |
ENDIF() |
20 | 23 |
|
21 | 24 |
SET(PROJECT_VERSION ${LEMON_VERSION}) |
22 | 25 |
|
23 | 26 |
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) |
24 | 27 |
|
25 | 28 |
FIND_PACKAGE(Doxygen) |
26 | 29 |
FIND_PACKAGE(Ghostscript) |
27 | 30 |
FIND_PACKAGE(GLPK 4.33) |
28 | 31 |
FIND_PACKAGE(CPLEX) |
29 | 32 |
FIND_PACKAGE(COIN) |
1 | 1 |
dnl Process this file with autoconf to produce a configure script. |
2 | 2 |
|
3 | 3 |
dnl Version information. |
4 | 4 |
m4_define([lemon_version_number], |
5 |
|
|
5 |
[m4_normalize(esyscmd([echo ${LEMON_VERSION}]))]) |
|
6 | 6 |
dnl m4_define([lemon_version_number], []) |
7 | 7 |
m4_define([lemon_hg_path], [m4_normalize(esyscmd([./scripts/chg-len.py]))]) |
8 |
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i]))]) |
|
8 |
m4_define([lemon_hg_revision], [m4_normalize(esyscmd([hg id -i 2> /dev/null]))]) |
|
9 | 9 |
m4_define([lemon_version], [ifelse(lemon_version_number(), |
10 |
[], |
|
11 |
[lemon_hg_path().lemon_hg_revision()], |
|
12 |
|
|
10 |
[], |
|
11 |
[ifelse(lemon_hg_revision(), |
|
12 |
[], |
|
13 |
[hg-tip], |
|
14 |
[lemon_hg_path().lemon_hg_revision()])], |
|
15 |
[lemon_version_number()])]) |
|
13 | 16 |
|
14 | 17 |
AC_PREREQ([2.59]) |
15 | 18 |
AC_INIT([LEMON], [lemon_version()], [lemon-user@lemon.cs.elte.hu], [lemon]) |
16 | 19 |
AC_CONFIG_AUX_DIR([build-aux]) |
17 | 20 |
AC_CONFIG_MACRO_DIR([m4]) |
18 | 21 |
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects nostdinc]) |
19 | 22 |
AC_CONFIG_SRCDIR([lemon/list_graph.h]) |
20 | 23 |
AC_CONFIG_HEADERS([config.h lemon/config.h]) |
21 | 24 |
|
22 | 25 |
AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string]) |
23 | 26 |
|
24 | 27 |
dnl Do compilation tests using the C++ compiler. |
0 comments (0 inline)