diff options
author | bunnei <bunneidev@gmail.com> | 2017-08-02 01:54:24 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-08-04 02:10:37 +0200 |
commit | f44a1e0291ab64ea9f34a9263432f30d18f3e98d (patch) | |
tree | 985c56c99da9edd301e96bf27551de33a805a629 | |
parent | core: Expose AppLoader as a public interface. (diff) | |
download | yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar.gz yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar.bz2 yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar.lz yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar.xz yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.tar.zst yuzu-f44a1e0291ab64ea9f34a9263432f30d18f3e98d.zip |
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/common/scm_rev.cpp.in | 2 | ||||
-rw-r--r-- | src/common/scm_rev.h | 1 |
3 files changed, 11 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) diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in index 0080db5d5..4083095d5 100644 --- a/src/common/scm_rev.cpp.in +++ b/src/common/scm_rev.cpp.in @@ -8,6 +8,7 @@ #define GIT_BRANCH "@GIT_BRANCH@" #define GIT_DESC "@GIT_DESC@" #define BUILD_NAME "@REPO_NAME@" +#define BUILD_DATE "@BUILD_DATE@" namespace Common { @@ -15,6 +16,7 @@ const char g_scm_rev[] = GIT_REV; const char g_scm_branch[] = GIT_BRANCH; const char g_scm_desc[] = GIT_DESC; const char g_build_name[] = BUILD_NAME; +const char g_build_date[] = BUILD_DATE; } // namespace diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h index e22389803..18aaa1735 100644 --- a/src/common/scm_rev.h +++ b/src/common/scm_rev.h @@ -10,5 +10,6 @@ extern const char g_scm_rev[]; extern const char g_scm_branch[]; extern const char g_scm_desc[]; extern const char g_build_name[]; +extern const char g_build_date[]; } // namespace |