summaryrefslogtreecommitdiff
path: root/cmake/modules/generate_version_file.cmake
blob: 4479855366bb240eee07c9c385c1d1643310cee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
execute_process(
	COMMAND git rev-parse --short HEAD
	RESULT_VARIABLE PARSE_RESULT
	OUTPUT_VARIABLE PARSE_OUTPUT
	OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT PARSE_RESULT)
	set(HASH "${PARSE_OUTPUT}")
else()
	set(HASH "NOTFOUND")
endif()
configure_file("${TEMPLATE}" "${OUTPUT}" @ONLY)