Integrate review feedback
This commit is contained in:
parent
45ac3ecf6a
commit
16831f100e
4 changed files with 9 additions and 9 deletions
|
|
@ -94,12 +94,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fPIC")
|
|||
set(ANBOX_TRANSLATOR_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/anbox/translators)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTRANSLATOR_INSTALL_DIR=\\\"${CMAKE_INSTALL_PREFIX}/${ANBOX_TRANSLATOR_INSTALL_DIR}\\\"")
|
||||
|
||||
if (NOT VERSION)
|
||||
set(VERSION 2)
|
||||
if (NOT ANBOX_VERSION)
|
||||
set(ANBOX_VERSION 2)
|
||||
if ("${cmake_build_type_lower}" STREQUAL "release")
|
||||
set(VERSION_SUFFIX "")
|
||||
set(ANBOX_VERSION_SUFFIX "")
|
||||
else()
|
||||
set(VERSION_SUFFIX dev)
|
||||
set(ANBOX_VERSION_SUFFIX dev)
|
||||
endif()
|
||||
endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/anbox/build/version.h.in
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@
|
|||
namespace anbox {
|
||||
namespace build {
|
||||
/// @brief version_major marks the major version
|
||||
static constexpr const std::uint32_t version_major{@VERSION@};
|
||||
static constexpr const std::uint32_t version_major{@ANBOX_VERSION@};
|
||||
/// @brief version_suffix is an additional suffix which can be amended to
|
||||
/// the major version number to indicate a dev build for example.
|
||||
static const std::string version_suffix{"@VERSION_SUFFIX@"};
|
||||
static constexpr const char *version_suffix{"@ANBOX_VERSION_SUFFIX@"};
|
||||
/// @brief version queries the version of Anbox
|
||||
std::string version();
|
||||
std::string print_version();
|
||||
} // namespace build
|
||||
} // namespace anbox
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class SystemInformation {
|
|||
std::stringstream s;
|
||||
|
||||
s << "version: "
|
||||
<< anbox::build::version()
|
||||
<< anbox::build::print_version()
|
||||
<< std::endl;
|
||||
|
||||
s << "os:" << std::endl
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ anbox::cmds::Version::Version()
|
|||
cli::Name{"version"}, cli::Usage{"version"},
|
||||
cli::Description{"print the version of the daemon"}} {
|
||||
action([](const cli::Command::Context& ctxt) {
|
||||
ctxt.cout << "anbox " << build::version() << std::endl;
|
||||
ctxt.cout << "anbox " << build::print_version() << std::endl;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue