File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,19 @@ include_guard()
1010
1111find_package (Git REQUIRED)
1212
13+ macro (getsha workingDir varName)
14+ execute_process (
15+ COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
16+ WORKING_DIRECTORY ${${workingDir} }
17+ OUTPUT_VARIABLE ${varName}
18+ # ERROR_QUIET
19+ OUTPUT_STRIP_TRAILING_WHITESPACE
20+ )
21+ endmacro ()
22+
23+ getSha(CMAKE_CURRENT_LIST_DIR FLUID_CORE_SHA)
24+ getSha(CMAKE_CURRENT_SOURCE_DIR FLUID_VERSION_SHA)
25+
1326execute_process (
1427 COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --always
1528 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -19,6 +32,8 @@ execute_process(
1932 OUTPUT_STRIP_TRAILING_WHITESPACE
2033)
2134
35+ set (FLUID_VERSION_TAG "${FLUID_VERSION_TAG} +sha.${FLUID_VERSION_SHA} .core.sha.${FLUID_CORE_SHA} " )
36+
2237if (result)
2338 message (VERBOSE "Failed to get version string from Git, falling back to indexed header" )
2439else ()
You can’t perform that action at this time.
0 commit comments