mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
[CMake] Fix detection of git description and hash for CMake 2.8.12
This commit is contained in:
parent
3229bedb36
commit
80c0c4f663
2 changed files with 8 additions and 4 deletions
|
@ -99,7 +99,9 @@ function(get_git_head_hash GIT_DIR OUTPUT_VAR)
|
|||
message(FATAL_ERROR \""${GIT_DIR}\" is not an absolute path")
|
||||
endif()
|
||||
find_package(Git)
|
||||
if (NOT Git_FOUND)
|
||||
# NOTE: Use `GIT_FOUND` rather than `Git_FOUND` which was only
|
||||
# available in CMake >= 3.5
|
||||
if (NOT GIT_FOUND)
|
||||
set(${OUTPUT_VAR} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
@ -146,7 +148,9 @@ function(get_git_head_describe GIT_DIR OUTPUT_VAR)
|
|||
message(FATAL_ERROR \""${GIT_DIR}\" is not an absolute path")
|
||||
endif()
|
||||
find_package(Git)
|
||||
if (NOT Git_FOUND)
|
||||
# NOTE: Use `GIT_FOUND` rather than `Git_FOUND` which was only
|
||||
# available in CMake >= 3.5
|
||||
if (NOT GIT_FOUND)
|
||||
set(${OUTPUT_VAR} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue