From 56f5e65938af9cd01e874107e7c36342f696f1ce Mon Sep 17 00:00:00 2001 From: Hari Thangirala Date: Mon, 11 Apr 2016 18:48:29 -0500 Subject: [PATCH] ROCR Build ID support Fix dirty-tree status. Thanks to Fan for fixing the issue. [git-p4: depot-paths = "//depot/stg/hsa/drivers/hsa/runtime/": change = 1256716] [ROCm/ROCR-Runtime commit: 0545761aa9494e4ec6969995a66e15b8b3ae2edf] --- projects/rocr-runtime/runtime/hsa-runtime/core/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/core/CMakeLists.txt index 3f75fe5d92..fa6eab008f 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/CMakeLists.txt @@ -105,8 +105,8 @@ else ( NOT DEFINED BUILDID) ## get commit information execute_process(COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_BUILD_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) ## check dirty tree status - execute_process(COMMAND "git diff --shortstat 2> /dev/null|grep \"0 files changed\"|wc -l" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_CLEAN_TREE OUTPUT_STRIP_TRAILING_WHITESPACE) - set ( BUILD_ID "${ROCR_BUILD_COMMIT}.${ROCR_BUILD_TIME}.${ROCR_CLEAN_TREE}") + execute_process(COMMAND git diff --shortstat COMMAND wc -l WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE ROCR_DIRTY_TREE OUTPUT_STRIP_TRAILING_WHITESPACE) + set ( BUILD_ID "${ROCR_BUILD_COMMIT}.${ROCR_BUILD_TIME}.${ROCR_DIRTY_TREE}") add_definitions ( -DROCR_BUILD_ID=${BUILD_ID}) endif ()