Skip to content

Commit 4549e8e

Browse files
committed
common/version: --version to output BUILD_TYPE
``` $ ceph-osd --version ceph version 20.0.0-514-g7a036c6b017 (7a036c6) tentacle (dev - Debug) ``` Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 2e6ef87)
1 parent 2338fc6 commit 4549e8e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if(NOT CMAKE_BUILD_TYPE)
2424
STRING "BUILD_TYPE is ${default_build_type}, other options are: RelWithDebInfo, Release, and MinSizeRel." FORCE)
2525
endif()
2626
message(STATUS "BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
27+
set(CEPH_BUILD_TYPE ${CMAKE_BUILD_TYPE})
2728

2829
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
2930
set(LINUX ON)

src/ceph_release.h.in.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
#define CEPH_RELEASE @CEPH_RELEASE@
55
#define CEPH_RELEASE_NAME "@CEPH_RELEASE_NAME@"
66
#define CEPH_RELEASE_TYPE "@CEPH_RELEASE_TYPE@"
7+
#define CEPH_BUILD_TYPE "@CEPH_BUILD_TYPE@"
78

89
#endif

src/common/version.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ std::string const pretty_version_to_str(void)
4949
oss << "ceph version " << CEPH_GIT_NICE_VER
5050
<< " (" << STRINGIFY(CEPH_GIT_VER) << ") "
5151
<< ceph_release_name(CEPH_RELEASE)
52-
<< " (" << CEPH_RELEASE_TYPE << ")"
52+
<< " (" << CEPH_RELEASE_TYPE << " - "
53+
<< CEPH_BUILD_TYPE << ")"
5354
#ifdef WITH_CRIMSON
5455
<< " (crimson)"
5556
#endif

0 commit comments

Comments
 (0)