summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-08-01 19:54:24 -0400
committerbunnei <bunneidev@gmail.com>2017-08-03 20:10:37 -0400
commitf44a1e0291ab64ea9f34a9263432f30d18f3e98d (patch)
tree985c56c99da9edd301e96bf27551de33a805a629 /CMakeLists.txt
parent9b8e5bea6619606afe10dfc38b1d8f6a47ba8332 (diff)
common: Add build timestamp to scm_rev.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
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)