15 unset(CAMITK_GIT_COMMIT_COUNT)
17 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
18 OUTPUT_VARIABLE CAMITK_GIT_COMMIT_COUNT
19 OUTPUT_STRIP_TRAILING_WHITESPACE
22 unset(CAMITK_GIT_BRANCH)
24 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
25 OUTPUT_VARIABLE CAMITK_GIT_BRANCH
26 OUTPUT_STRIP_TRAILING_WHITESPACE
29 unset(CAMITK_GIT_ABBREVIATED_HASH)
31 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
32 OUTPUT_VARIABLE CAMITK_GIT_ABBREVIATED_HASH
33 OUTPUT_STRIP_TRAILING_WHITESPACE
36 unset(CAMITK_GIT_HASH)
38 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
39 OUTPUT_VARIABLE CAMITK_GIT_HASH
40 OUTPUT_STRIP_TRAILING_WHITESPACE
43 unset(CAMITK_GIT_COMMITER_DATE)
45 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
46 OUTPUT_VARIABLE CAMITK_GIT_COMMITER_DATE
47 OUTPUT_STRIP_TRAILING_WHITESPACE
50 unset(CAMITK_ORIGIN_DEVELOP_GIT_HASH)
52 WORKING_DIRECTORY ${PATH_TO_SOURCE_DIR}
53 OUTPUT_VARIABLE CAMITK_ORIGIN_DEVELOP_GIT_HASH
54 OUTPUT_STRIP_TRAILING_WHITESPACE
57 string(SUBSTRING ${CAMITK_ORIGIN_DEVELOP_GIT_HASH} 0 8 CAMITK_ORIGIN_DEVELOP_GIT_ABBREVIATED_HASH)
59 if(NOT CAMITK_GIT_COMMIT_COUNT)
60 message(WARNING
"Unable to find the commit number using git : ${GIT_EXECUTABLE}")
61 set(CAMITK_GIT_COMMIT_COUNT
"unknown")
62 set(CAMITK_GIT_BRANCH
"unknown")
63 set(CAMITK_GIT_HASH
"unknown")
64 set(CAMITK_GIT_ABBREVIATED_HASH
"unknown")
65 set(CAMITK_ORIGIN_DEVELOP_GIT_HASH
"unknown")
66 set(CAMITK_ORIGIN_DEVELOP_GIT_ABBREVIATED_HASH
"unknown")