mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
feature: supports git SHA logging to log file
Related-To: NEO-11364 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
9f4c1b3daf
commit
fbb8fa7dea
@ -54,24 +54,24 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED NEO_VERSION_BUILD)
|
||||
set(NEO_VERSION_BUILD 0)
|
||||
set(NEO_REVISION 0)
|
||||
else()
|
||||
find_program(GIT NAMES git)
|
||||
if(NOT "${GIT}" STREQUAL "GIT-NOTFOUND")
|
||||
if(IS_DIRECTORY ${NEO_SOURCE_DIR}/.git)
|
||||
set(GIT_arg --git-dir=${NEO_SOURCE_DIR}/.git rev-parse HEAD)
|
||||
execute_process(
|
||||
COMMAND ${GIT} ${GIT_arg}
|
||||
OUTPUT_VARIABLE NEO_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
find_program(GIT NAMES git)
|
||||
if(NOT "${GIT}" STREQUAL "GIT-NOTFOUND")
|
||||
if(IS_DIRECTORY ${NEO_SOURCE_DIR}/.git)
|
||||
set(GIT_arg --git-dir=${NEO_SOURCE_DIR}/.git rev-parse HEAD)
|
||||
execute_process(
|
||||
COMMAND ${GIT} ${GIT_arg}
|
||||
OUTPUT_VARIABLE NEO_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED NEO_REVISION)
|
||||
set(NEO_REVISION 0)
|
||||
set(NEO_REVISION "No git SHA found, compiled outside git folder")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED NEO_VERSION_BUILD)
|
||||
set(NEO_VERSION_BUILD 0)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED NEO_VERSION_HOTFIX)
|
||||
|
Reference in New Issue
Block a user