mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-10 22:12:25 +00:00
The existing code added the git commit info (`GIT_COMMIT_HASH` and `GIT_BRANCH`) to every file, which was a problem for leveraging `ccache` to cache build objects. This change adds a separate C++ file from where these compile-time variables are propagated to wherever they are needed. A new CMake file is added to set the commit info if the `git` binary is available.
14 lines
157 B
C++
14 lines
157 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace xrpl::git {
|
|
|
|
std::string const&
|
|
getCommitHash();
|
|
|
|
std::string const&
|
|
getBuildBranch();
|
|
|
|
} // namespace xrpl::git
|