mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-13 17:15:41 +00:00
cmake: fix incorrect assumption about the value of git's core.abbrev
While the default value of `git config core.abbrev` is `7` (used to truncate the commit hash in several git commands) and most people don't configure anything else, I happen to prefer when commits hashes stay valid for a while, so I changed that value to `20`. Because of this, FEX fails to build in External/FEXCore/Source/Interface/Core/CPUID.cpp:961 Let's be explicit in the git command about what minimum length of commit hash we expect.
This commit is contained in:
parent
a2f4f494a9
commit
31c47f05f4
4
External/FEXCore/CMakeLists.txt
vendored
4
External/FEXCore/CMakeLists.txt
vendored
@ -46,14 +46,14 @@ if (OVERRIDE_VERSION STREQUAL "detect")
|
||||
|
||||
if (GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short=7 HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_SHORT_HASH
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe
|
||||
COMMAND ${GIT_EXECUTABLE} describe --abbrev=7
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_STRING
|
||||
ERROR_QUIET
|
||||
|
Loading…
Reference in New Issue
Block a user