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