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>


[ROCm/rdc commit: ac874d3921]
This commit is contained in:
Chen Gong authored and Galantsev, Dmitrii committed 2024-09-10 10:06:44 -05:00
1 والد cc3c3ce9b6
کامیت 5db56b48eb
3 files changed
+10

No files matched your search

@@ -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)
@@ -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}
@@ -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}