Files
tile/cmake/BuildInfo.cmake
tqcq aea5fc08c4
Some checks failed
android / build (arm64-v8a) (push) Failing after 20s
android / build (armeabi-v7a) (push) Failing after 22s
android / build (x86) (push) Failing after 19s
android / build (x86_64) (push) Failing after 20s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Failing after 5m31s
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Has been cancelled
linux-arm-gcc / linux-gcc-arm (Debug) (push) Has been cancelled
linux-arm-gcc / linux-gcc-arm (Release) (push) Has been cancelled
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Has been cancelled
linux-arm-gcc / linux-gcc-armhf (Release) (push) Has been cancelled
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Has been cancelled
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Has been cancelled
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Has been cancelled
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Has been cancelled
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Has been cancelled
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Has been cancelled
linux-x64-clang / linux-clang (Debug) (push) Has been cancelled
linux-x64-clang / linux-clang (Release) (push) Has been cancelled
linux-x64-gcc / linux-gcc (Release) (push) Has been cancelled
linux-x64-gcc / linux-gcc (Debug) (push) Has been cancelled
linux-x86-gcc / linux-gcc (Debug) (push) Failing after 3m36s
linux-x86-gcc / linux-gcc (Release) (push) Failing after 4m11s
init repo.
2025-12-23 11:39:40 +08:00

27 lines
784 B
CMake

macro(get_git_commit_hash output)
# full commit hash
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format="%H"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE ${output}
OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro()
macro(get_git_commit_date output)
# 2024-06-02T20:17:41+00:00
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format="%cI"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE ${output}
OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro()
macro(get_git_commit_subject output)
# message from `git commit -m "message"`
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format="%s"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_SUBJECT
OUTPUT_STRIP_TRAILING_WHITESPACE)
endmacro()