summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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)
295 endforeach() 295 endforeach()
296endfunction() 296endfunction()
297 297
298# generate git revision information 298# Gets a UTC timstamp and sets the provided variable to it
299function(get_timestamp _var)
300 string(TIMESTAMP timestamp UTC)
301 set(${_var} "${timestamp}" PARENT_SCOPE)
302endfunction()
303
304# generate git/build information
299include(GetGitRevisionDescription) 305include(GetGitRevisionDescription)
300get_git_head_revision(GIT_REF_SPEC GIT_REV) 306get_git_head_revision(GIT_REF_SPEC GIT_REV)
301git_describe(GIT_DESC --always --long --dirty) 307git_describe(GIT_DESC --always --long --dirty)
302git_branch_name(GIT_BRANCH) 308git_branch_name(GIT_BRANCH)
309get_timestamp(BUILD_DATE)
303 310
304enable_testing() 311enable_testing()
305add_subdirectory(externals) 312add_subdirectory(externals)