From: Sage Weil Date: Mon, 4 Nov 2019 22:56:45 +0000 (-0600) Subject: src/CMakeLists: remove leading 'v' from 'git describe' version X-Git-Tag: v15.1.0~956^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=614e9b410941f86e5a706f748dfebb40dc831a27;p=ceph.git src/CMakeLists: remove leading 'v' from 'git describe' version git describe gives you something like 'v15.0.0-6865-g7e4ef7f8ecc' but we want no leading v, to match prior versions of ceph. Signed-off-by: Sage Weil --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2a9d7a6692..5d77091b11f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -176,7 +176,9 @@ set(GCOV_PREFIX_STRIP 4) option(ENABLE_GIT_VERSION "build Ceph with git version string" ON) if(${ENABLE_GIT_VERSION}) get_git_head_revision(GIT_REFSPEC CEPH_GIT_VER) - git_describe(CEPH_GIT_NICE_VER --always) + git_describe(CEPH_GIT_NICE_VER_WITH_V --always) + # remove leading 'v' + string(SUBSTRING ${CEPH_GIT_NICE_VER_WITH_V} 1 -1 CEPH_GIT_NICE_VER) #if building from a source tarball via make-dist if(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND") message(STATUS "Ceph/.git directory not found, parsing ${CMAKE_CURRENT_SOURCE_DIR}/.git_version for CEPH_GIT_VER and CEPH_GIT_NICE_VER")