equal
deleted
inserted
replaced
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6) |
2 |
2 |
3 SET(PROJECT_NAME "LEMON") |
3 SET(PROJECT_NAME "LEMON") |
4 PROJECT(${PROJECT_NAME}) |
4 PROJECT(${PROJECT_NAME}) |
|
5 |
|
6 INCLUDE(FindPythonInterp) |
5 |
7 |
6 IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
8 IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
7 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
9 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake) |
8 ELSEIF(DEFINED ENV{LEMON_VERSION}) |
10 ELSEIF(DEFINED ENV{LEMON_VERSION}) |
9 SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.") |
11 SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.") |
10 ELSE() |
12 ELSE() |
11 EXECUTE_PROCESS( |
13 EXECUTE_PROCESS( |
12 COMMAND ./scripts/chg-len.py |
14 COMMAND ${PYTHON_EXECUTABLE} ./scripts/chg-len.py |
13 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
15 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} |
14 OUTPUT_VARIABLE HG_REVISION_PATH |
16 OUTPUT_VARIABLE HG_REVISION_PATH |
15 ERROR_QUIET |
17 ERROR_QUIET |
16 OUTPUT_STRIP_TRAILING_WHITESPACE |
18 OUTPUT_STRIP_TRAILING_WHITESPACE |
17 ) |
19 ) |
23 OUTPUT_STRIP_TRAILING_WHITESPACE |
25 OUTPUT_STRIP_TRAILING_WHITESPACE |
24 ) |
26 ) |
25 IF(HG_REVISION STREQUAL "") |
27 IF(HG_REVISION STREQUAL "") |
26 SET(HG_REVISION_ID "hg-tip") |
28 SET(HG_REVISION_ID "hg-tip") |
27 ELSE() |
29 ELSE() |
28 SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION}) |
30 IF(HG_REVISION_PATH STREQUAL "") |
|
31 SET(HG_REVISION_ID ${HG_REVISION}) |
|
32 ELSE() |
|
33 SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION}) |
|
34 ENDIF() |
29 ENDIF() |
35 ENDIF() |
30 SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.") |
36 SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.") |
31 ENDIF() |
37 ENDIF() |
32 |
38 |
33 SET(PROJECT_VERSION ${LEMON_VERSION}) |
39 SET(PROJECT_VERSION ${LEMON_VERSION}) |
41 FIND_PACKAGE(COIN) |
47 FIND_PACKAGE(COIN) |
42 |
48 |
43 INCLUDE(CheckTypeSize) |
49 INCLUDE(CheckTypeSize) |
44 CHECK_TYPE_SIZE("long long" LONG_LONG) |
50 CHECK_TYPE_SIZE("long long" LONG_LONG) |
45 SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG}) |
51 SET(LEMON_HAVE_LONG_LONG ${HAVE_LONG_LONG}) |
46 |
|
47 INCLUDE(FindPythonInterp) |
|
48 |
52 |
49 ENABLE_TESTING() |
53 ENABLE_TESTING() |
50 |
54 |
51 ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND}) |
55 ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND}) |
52 |
56 |