mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 17:39:25 +02:00
Add Git describe validation
Validate the output CMake list for `git_output` is the right length Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
parent
b8896742f8
commit
13b2273a89
@ -97,9 +97,13 @@ if( GIT_FOUND )
|
||||
string( REGEX REPLACE "-.*" "" git_output "${git_output}" )
|
||||
string( REPLACE "." ";" git_output "${git_output}" )
|
||||
|
||||
list( GET git_output 0 AUDACITY_VERSION )
|
||||
list( GET git_output 1 AUDACITY_RELEASE )
|
||||
list( GET git_output 2 AUDACITY_REVISION )
|
||||
list( LENGTH git_output GIT_OUTPUT_LIST_LENGTH )
|
||||
|
||||
if( GIT_OUTPUT_LIST_LENGTH GREATER_EQUAL 3 )
|
||||
list( GET git_output 0 AUDACITY_VERSION )
|
||||
list( GET git_output 1 AUDACITY_RELEASE )
|
||||
list( GET git_output 2 AUDACITY_REVISION )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user