style: reformatted to make the CMake scripts more compact
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
8fd7d8328a
commit
4aa9978dcd
6 changed files with 48 additions and 91 deletions
|
@ -12,12 +12,7 @@ execute_process(
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(GIT_DESCRIBE_ERROR_CODE EQUAL 0)
|
||||
string(
|
||||
REGEX MATCH
|
||||
"^v?([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?(\\.([0-9]+))?.*$"
|
||||
_
|
||||
"${GIT_DESCRIBE_VERSION_STRING}"
|
||||
)
|
||||
string(REGEX MATCH "^v?([0-9]+)(\\.([0-9]+))?(\\.([0-9]+))?(\\.([0-9]+))?.*$" _ "${GIT_DESCRIBE_VERSION_STRING}")
|
||||
if(DEFINED CMAKE_MATCH_1)
|
||||
set(VERSION_STRING "${CMAKE_MATCH_1}")
|
||||
if(DEFINED CMAKE_MATCH_3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue