From: Michael Wallner Date: Sun, 27 Dec 2020 17:15:01 +0000 (+0100) Subject: cmake: simplify version config X-Git-Tag: 1.1.0-beta2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8e9e8f3d0fc148e58e90a9404f46b1c1adea1644;p=m6w6%2Flibmemcached cmake: simplify version config --- diff --git a/CMakeVersions.txt b/CMakeVersions.txt index 5688a61e..4acccf9b 100644 --- a/CMakeVersions.txt +++ b/CMakeVersions.txt @@ -1,33 +1,10 @@ -function(to_hex HEX) - # mind you, not really hexadecimal, but just a decimal in hex notation, huh?! - set(XNUMBER 0x) - foreach(DEC IN LISTS ARGN) - while(1) - string(LENGTH "${DEC}" LEN) - if(LEN GREATER_EQUAL 3) - break() - endif() - string(CONCAT DEC "0" "${DEC}") - endwhile() - if(DEC GREATER 999) - message(WARNING "to_hex(HEX ${DEC}): decimal wider than 3 digits") - endif() - string(APPEND XNUMBER ${DEC}) - endforeach() - set(${HEX} ${XNUMBER} PARENT_SCOPE) -endfunction() - # # libmemcached # -set(LIBMEMCACHED_VERSION_MAJOR 1) -set(LIBMEMCACHED_VERSION_MINOR 1) -set(LIBMEMCACHED_VERSION_PATCH 0) - -set(LIBMEMCACHED_VERSION ${LIBMEMCACHED_VERSION_MAJOR}.${LIBMEMCACHED_VERSION_MINOR}.${LIBMEMCACHED_VERSION_PATCH}) -set(LIBMEMCACHED_VERSION_INC ${LIBMEMCACHED_VERSION_MAJOR}.0) -to_hex(LIBMEMCACHED_VERSION_HEX ${LIBMEMCACHED_VERSION_MAJOR} ${LIBMEMCACHED_VERSION_MINOR} ${LIBMEMCACHED_VERSION_PATCH}) +set(LIBMEMCACHED_VERSION 1.1.0) +set(LIBMEMCACHED_VERSION_INC 1.0) +set(LIBMEMCACHED_VERSION_HEX 0x001001000) # libmemcached.so @@ -38,13 +15,9 @@ set(LIBMEMCACHED_SO_VERSION ${LIBMEMCACHED_SO_SOVERSION}.0.0) # libmemcachedutil # -set(LIBMEMCACHEDUTIL_VERSION_MAJOR 1) -set(LIBMEMCACHEDUTIL_VERSION_MINOR 1) -set(LIBMEMCACHEDUTIL_VERSION_PATCH 0) - -set(LIBMEMCACHEDUTIL_VERSION ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.${LIBMEMCACHEDUTIL_VERSION_MINOR}.${LIBMEMCACHEDUTIL_VERSION_PATCH}) -set(LIBMEMCACHEDUTIL_VERSION_INC ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.0) -to_hex(LIBMEMCACHEDUTIL_VERSION_HEX ${LIBMEMCACHEDUTIL_VERSION_MAJOR} ${LIBMEMCACHEDUTIL_VERSION_MINOR} ${LIBMEMCACHEDUTIL_VERSION_PATCH}) +set(LIBMEMCACHEDUTIL_VERSION 1.1.0) +set(LIBMEMCACHEDUTIL_VERSION_INC 1.0) +set(LIBMEMCACHEDUTIL_VERSION_HEX 0x001001000) # libmemcachedutil.so @@ -55,13 +28,9 @@ set(LIBMEMCACHEDUTIL_SO_VERSION ${LIBMEMCACHEDUTIL_SO_SOVERSION}.0.0) # libmemcachedprotocol # -set(LIBMEMCACHEDPROTOCOL_VERSION_MAJOR 0) -set(LIBMEMCACHEDPROTOCOL_VERSION_MINOR 1) -set(LIBMEMCACHEDPROTOCOL_VERSION_PATCH 0) - -set(LIBMEMCACHEDPROTOCOL_VERSION ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.${LIBMEMCACHEDPROTOCOL_VERSION_MINOR}.${LIBMEMCACHEDPROTOCOL_VERSION_PATCH}) -set(LIBMEMCACHEDPROTOCOL_VERSION_INC ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.0) -to_hex(LIBMEMCACHEDPROTOCOL_VERSION_HEX ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR} ${LIBMEMCACHEDPROTOCOL_VERSION_MINOR} ${LIBMEMCACHEDPROTOCOL_VERSION_PATCH}) +set(LIBMEMCACHEDPROTOCOL_VERSION 0.1.0) +set(LIBMEMCACHEDPROTOCOL_VERSION_INC 0.0) +set(LIBMEMCACHEDPROTOCOL_VERSION_HEX 0x000001000) # libmemcachedprotocol.so @@ -72,13 +41,9 @@ set(LIBMEMCACHEDPROTOCOL_SO_VERSION ${LIBMEMCACHEDPROTOCOL_SO_SOVERSION}.0.0) # libhashkit # -set(LIBHASHKIT_VERSION_MAJOR 1) -set(LIBHASHKIT_VERSION_MINOR 1) -set(LIBHASHKIT_VERSION_PATCH 0) - -set(LIBHASHKIT_VERSION ${LIBHASHKIT_VERSION_MAJOR}.${LIBHASHKIT_VERSION_MINOR}.${LIBHASHKIT_VERSION_PATCH}) -set(LIBHASHKIT_VERSION_INC ${LIBHASHKIT_VERSION_MAJOR}.0) -to_hex(LIBHASHKIT_VERSION_HEX ${LIBHASHKIT_VERSION_MAJOR} ${LIBHASHKIT_VERSION_MINOR} ${LIBHASHKIT_VERSION_PATCH}) +set(LIBHASHKIT_VERSION 1.1.0) +set(LIBHASHKIT_VERSION_INC 1.0) +set(LIBHASHKIT_VERSION_HEX 0x00100100) # libhashkit.so