Skip to content

Commit

Permalink
Revert "Improve print version info"
Browse files Browse the repository at this point in the history
This reverts commit 90bfaee.
  • Loading branch information
Jackarain committed Jun 1, 2024
1 parent 90bfaee commit e4fbb25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
18 changes: 7 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

################################################################################

if (ENABLE_GIT_VERSION)
find_package(Git)
gitGetVersion(${CMAKE_CURRENT_SOURCE_DIR} proxy)
set(VERSION_GIT ${proxy_WC_REVISION_HASH})
string(TIMESTAMP PVERSION "%Y%m%d-${VERSION_GIT}-${CMAKE_SYSTEM_NAME}")
endif()

# Disable in-source builds to prevent source tree corruption.
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "
Expand Down Expand Up @@ -75,17 +82,6 @@ option(ENABLE_LINKE_TO_LIBATOMIC "link to libatomic.so - some platform requires

################################################################################

if (ENABLE_GIT_VERSION)
find_package(Git)
gitGetVersion(${CMAKE_CURRENT_SOURCE_DIR} proxy)
set(VERSION_GIT ${proxy_WC_REVISION_HASH})
string(TIMESTAMP PVERSION "${VERSION_GIT} (%Y-%m-%d %H:%M:%S)")
add_definitions(-DVERSION_GIT=\"${PVERSION}\")
message(STATUS "Git Version: ${PVERSION}")
endif()

################################################################################

find_program(MOLD_LINKER mold)
find_program(LLD_LINKER lld)

Expand Down
12 changes: 2 additions & 10 deletions server/proxy_server/main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,8 @@ inline std::string version_info()
os_name = BOOST_PLATFORM;
#endif

std::string git_version;

#ifdef VERSION_GIT
git_version = VERSION_GIT;
#else
git_version = __DATE__ + " " + __TIME__;
#endif

oss << "Built: " << git_version
<< ", " << os_name
oss << "Built on " << __DATE__ << " " << __TIME__
<< " runs on " << os_name
<< ", " << BOOST_COMPILER
<< ", Boost " << BOOST_LIB_VERSION
<< ", SSL: " << OPENSSL_VERSION_TEXT
Expand Down

0 comments on commit e4fbb25

Please sign in to comment.