fix(build): fails if git is missing #19366

Generate empty file if git is missing.
This commit is contained in:
Luis Felipe Dominguez Vega 2022-07-14 18:25:28 -04:00 committed by GitHub
parent 001f19de28
commit 75ad050919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,7 @@ endif()
find_program(GIT_EXECUTABLE git)
if(NOT GIT_EXECUTABLE)
message(AUTHOR_WARNING "Skipping version-string generation (cannot find git)")
file(WRITE "${OUTPUT}" "")
return()
endif()