From f44a1e0291ab64ea9f34a9263432f30d18f3e98d Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 1 Aug 2017 19:54:24 -0400 Subject: common: Add build timestamp to scm_rev. --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 79d8046d9..ddba04ef9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,11 +295,18 @@ function(create_directory_groups) endforeach() endfunction() -# generate git revision information +# Gets a UTC timstamp and sets the provided variable to it +function(get_timestamp _var) + string(TIMESTAMP timestamp UTC) + set(${_var} "${timestamp}" PARENT_SCOPE) +endfunction() + +# generate git/build information include(GetGitRevisionDescription) get_git_head_revision(GIT_REF_SPEC GIT_REV) git_describe(GIT_DESC --always --long --dirty) git_branch_name(GIT_BRANCH) +get_timestamp(BUILD_DATE) enable_testing() add_subdirectory(externals) -- cgit v1.2.3