Commit a7ea5de7 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

ENH: report branch name in summary

parent 2ea07dea
......@@ -28,6 +28,16 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
OUTPUT_VARIABLE OTB_GIT_LAST_COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
#git symbolic-ref --short -q HEAD does not work on older git version
#rather than checking for git version. it is better to not use that
#option and employ cmake stuff to do the work
execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OTB_GIT_SYMBOLIC_REF_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
get_filename_component(OTB_GIT_BRANCH ${OTB_GIT_SYMBOLIC_REF_OUTPUT} NAME)
execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%H
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OTB_WC_REVISION
......
......@@ -385,10 +385,8 @@ endmacro()
message("\n======================= Begin of OTB cmake summary =======================\n")
if(OTB_GIT_LAST_COMMIT)
get_white_spaces("git log -1 --oneline" insert_sp)
message("git log -1 --oneline = [${OTB_GIT_LAST_COMMIT}]")
endif()
message("git log -1 --oneline = [${OTB_GIT_LAST_COMMIT}]")
message("git symbolic-ref -q HEAD = ${OTB_GIT_BRANCH}")
set(option_list ${OTB_MODULE_ACTIVATION_OPTION_LIST})
list(SORT option_list)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment