mirror of
https://github.com/bkryza/clang-uml.git
synced 2025-04-20 18:51:23 +08:00
Fix clang-uml version detection CMake macro (#211)
This commit is contained in:
parent
f3a0d98ee6
commit
4ff42d032f
@ -13,9 +13,9 @@ function(setup_git_version)
|
||||
endif(GIT_EXECUTABLE)
|
||||
endif(NOT DEFINED GIT_VERSION)
|
||||
|
||||
if(NOT DEFINED GIT_VERSION)
|
||||
if(NOT DEFINED GIT_VERSION OR "${GIT_VERSION}" STREQUAL "")
|
||||
set(GIT_VERSION "0.0.0-unknown")
|
||||
endif(NOT DEFINED GIT_VERSION)
|
||||
endif(NOT DEFINED GIT_VERSION OR "${GIT_VERSION}" STREQUAL "")
|
||||
|
||||
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.(.+)"
|
||||
GIT_VERSION_MATCH ${GIT_VERSION})
|
||||
@ -24,4 +24,4 @@ function(setup_git_version)
|
||||
set(GIT_VERSION_PATCH ${CMAKE_MATCH_3} PARENT_SCOPE)
|
||||
set(GIT_VERSION ${GIT_VERSION} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
endfunction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user