Get the hash value and pass it to rdcd and rdci

Want to display version information along with the hash value.

Change-Id: I0f9ad576f8f66747ce2e84d4f524ccd16d399927
Signed-off-by: Chen Gong <curry.gong@amd.com>
Этот коммит содержится в:
Chen Gong
2024-08-21 10:44:51 +08:00
коммит произвёл Galantsev, Dmitrii
родитель bffe4e22fa
Коммит ac874d3921
3 изменённых файлов: 10 добавлений и 0 удалений
+8
Просмотреть файл
@@ -82,6 +82,14 @@ option(CMAKE_VERBOSE_MAKEFILE "Enable verbose output" OFF)
option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile commands for linters and autocompleters" ON)
execute_process(
COMMAND ${GIT} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("The HASH value of the current HEAD submission in this RDC code repository is : " ${GIT_HASH})
# Don't print 'Up-to-date' when installing
set(CMAKE_INSTALL_MESSAGE LAZY)
+1
Просмотреть файл
@@ -75,6 +75,7 @@ set(RDCI_EXE "rdci")
link_directories(${SMI_LIB_DIR})
add_executable(${RDCI_EXE} "${RDCI_SRC_LIST}")
target_compile_definitions(${RDCI_EXE} PRIVATE CURRENT_GIT_HASH=${GIT_HASH})
# help find librdc_bootstrap.so at runtime
set_target_properties(${RDCI_EXE}
+1
Просмотреть файл
@@ -80,6 +80,7 @@ configure_file("${SERVER_CONFIG_FILE}" "${PROJECT_BINARY_DIR}/${SERVER_CONFIG_FI
link_directories(${SMI_LIB_DIR})
add_executable(${SERVER_DAEMON_EXE} "${SERVER_SRC_LIST}")
target_compile_definitions(${SERVER_DAEMON_EXE} PRIVATE CURRENT_GIT_HASH=${GIT_HASH})
# help find librdc_bootstrap.so at runtime
set_target_properties(${SERVER_DAEMON_EXE}