ff1bed313b
Some checks failed
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-arm (Debug) (push) Waiting to run
linux-arm-gcc / linux-gcc-arm (Release) (push) Waiting to run
linux-arm-gcc / linux-gcc-armhf (Debug) (push) Waiting to run
linux-mips-gcc / linux-gcc-mipsel (Release) (push) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Debug) (push) Waiting to run
linux-mips64-gcc / linux-gcc-mips64el (Release) (push) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Debug) (push) Waiting to run
linux-riscv64-gcc / linux-gcc-riscv64 (Release) (push) Waiting to run
linux-x64-gcc / linux-gcc (Debug) (push) Waiting to run
linux-x64-gcc / linux-gcc (Release) (push) Waiting to run
linux-x86-gcc / linux-gcc (Debug) (push) Waiting to run
linux-x86-gcc / linux-gcc (Release) (push) Waiting to run
linux-aarch64-cpu-gcc / linux-gcc-aarch64 (Debug) (push) Successful in 10m1s
linux-arm-gcc / linux-gcc-armhf (Release) (push) Has been cancelled
linux-mips-gcc / linux-gcc-mipsel (Debug) (push) Has been cancelled
27 lines
784 B
CMake
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()
|