COIN-OR::LEMON - Graph Library

Ticket #389: e74b5db4f2c6_cmake_version_string_fix.patch

File e74b5db4f2c6_cmake_version_string_fix.patch, 1.2 KB (added by Akos Ladanyi, 14 years ago)
  • CMakeLists.txt

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1282766560 -7200
    # Node ID e74b5db4f2c65b830730864ea94f956100f39e0a
    # Parent  e20fecd1945f0d5ac2a82b79a0e7d794de4e6cd9
    Put the output of chg-len.py in the version string (#389)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    a b  
    99  SET(LEMON_VERSION $ENV{LEMON_VERSION} CACHE STRING "LEMON version string.")
    1010ELSE()
    1111  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(
    1219    COMMAND hg id -i
    1320    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
    1421    OUTPUT_VARIABLE HG_REVISION
     
    1623    OUTPUT_STRIP_TRAILING_WHITESPACE
    1724  )
    1825  IF(HG_REVISION STREQUAL "")
    19     SET(HG_REVISION "hg-tip")
     26    SET(HG_REVISION_ID "hg-tip")
     27  ELSE()
     28    SET(HG_REVISION_ID ${HG_REVISION_PATH}.${HG_REVISION})
    2029  ENDIF()
    21   SET(LEMON_VERSION ${HG_REVISION} CACHE STRING "LEMON version string.")
     30  SET(LEMON_VERSION ${HG_REVISION_ID} CACHE STRING "LEMON version string.")
    2231ENDIF()
    2332
    2433SET(PROJECT_VERSION ${LEMON_VERSION})