forked from BigfootDev/flatbuffers
[cmake] Fix getting version info from tags during the build (#6936)
Use `git describe --tags` to query for lightweight tags along with the annotated ones.
This commit is contained in:
committed by
GitHub
parent
e89de4411d
commit
790f411542
@@ -6,7 +6,7 @@ set(VERSION_COMMIT 0)
|
|||||||
find_program(GIT git)
|
find_program(GIT git)
|
||||||
if(GIT)
|
if(GIT)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${GIT} describe
|
COMMAND ${GIT} describe --tags
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
|
OUTPUT_VARIABLE GIT_DESCRIBE_DIRTY
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
|||||||
Reference in New Issue
Block a user