mirror of
https://codeberg.org/armin/horizont.git
synced 2026-09-01 12:20:47 +02:00
13 lines
429 B
CMake
13 lines
429 B
CMake
# Generates HorizontBuildInfo.h with the current wall-clock timestamp.
|
|
# Run at build time (not configure time) so every build stamps a fresh date.
|
|
|
|
set(output "${GENERATED_DIR}/HorizontBuildInfo.h")
|
|
|
|
execute_process(
|
|
COMMAND date "+%Y-%m-%d__%H-%M-%S"
|
|
OUTPUT_VARIABLE timestamp
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
file(WRITE "${output}"
|
|
"#pragma once\n"
|
|
"#define HORIZONT_BUILD_TIMESTAMP \"${timestamp}\"\n")
|