COIN-OR::LEMON - Graph Library

Changeset 678:d1e1cd94bf49 in lemon-main


Ignore:
Timestamp:
05/29/09 12:40:53 (15 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Phase:
public
Message:

Put the version string into config.h

Also make it possible to set the version using the LEMON_VERSION environment
variable, and use the hg revision as version string in case this variable is
unset.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r677 r678  
    11CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
    22
    3 IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    4   INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    5 ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
    6   SET(PROJECT_NAME "LEMON")
    7   SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
    8 ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
     3SET(PROJECT_NAME "LEMON")
     4PROJECT(${PROJECT_NAME})
    95
    10 PROJECT(${PROJECT_NAME})
     6IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     7  INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
     8ELSEIF(DEFINED ENV{LEMON_VERSION})
     9  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
     10ELSE()
     11  EXECUTE_PROCESS(
     12    COMMAND hg id -i
     13    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     14    OUTPUT_VARIABLE HG_REVISION
     15    ERROR_QUIET
     16    OUTPUT_STRIP_TRAILING_WHITESPACE
     17  )
     18  SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
     19ENDIF()
     20
     21SET(PROJECT_VERSION ${LEMON_VERSION})
    1122
    1223SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
  • cmake/version.cmake.in

    r480 r678  
    1 SET(PROJECT_NAME "@PACKAGE_NAME@")
    2 SET(PROJECT_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
     1SET(LEMON_VERSION "@PACKAGE_VERSION@" CACHE STRING "LEMON version string.")
  • configure.ac

    r627 r678  
    1919AC_CONFIG_SRCDIR([lemon/list_graph.h])
    2020AC_CONFIG_HEADERS([config.h lemon/config.h])
     21
     22AC_DEFINE([LEMON_VERSION], [lemon_version()], [The version string])
    2123
    2224dnl Do compilation tests using the C++ compiler.
  • lemon/config.h.cmake

    r627 r678  
     1#define LEMON_VERSION "@PROJECT_VERSION@"
    12#cmakedefine LEMON_HAVE_LONG_LONG 1
    23#cmakedefine LEMON_HAVE_LP 1
  • lemon/config.h.in

    r627 r678  
     1/* The version string */
     2#undef LEMON_VERSION
     3
    14/* Define to 1 if you have long long */
    25#undef LEMON_HAVE_LONG_LONG
Note: See TracChangeset for help on using the changeset viewer.