aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-01-17 20:35:13 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-01-17 20:54:58 +0800
commit467559917008525d6b606de264e4a86a1c5e0620 (patch)
tree23a9a5ef13bd4f1d5cab4b2b7ddf13feba2c64f3
parent350c7e7e2c1bafbe8d543fc052aedad3e69ba5e1 (diff)
downloaddexon-solidity-467559917008525d6b606de264e4a86a1c5e0620.tar.gz
dexon-solidity-467559917008525d6b606de264e4a86a1c5e0620.tar.zst
dexon-solidity-467559917008525d6b606de264e4a86a1c5e0620.zip
Include SOL_VERSION_COMMIT/SOL_VERSION_PLATFORM in buildinfo.h
-rw-r--r--cmake/scripts/buildinfo.cmake2
-rw-r--r--cmake/templates/BuildInfo.h.in2
-rw-r--r--libsolidity/interface/Version.cpp3
3 files changed, 6 insertions, 1 deletions
diff --git a/cmake/scripts/buildinfo.cmake b/cmake/scripts/buildinfo.cmake
index 8e1615f6..efbfb8fb 100644
--- a/cmake/scripts/buildinfo.cmake
+++ b/cmake/scripts/buildinfo.cmake
@@ -60,6 +60,8 @@ if (SOL_COMMIT_HASH AND SOL_LOCAL_CHANGES)
set(SOL_COMMIT_HASH "${SOL_COMMIT_HASH}.mod")
endif()
+set(SOL_VERSION_COMMIT "commit.${SOL_COMMIT_HASH}")
+set(SOl_VERSION_PLATFORM ETH_BUILD_PLATFORM)
set(SOL_VERSION_BUILDINFO "commit.${SOL_COMMIT_HASH}.${ETH_BUILD_PLATFORM}")
set(TMPFILE "${ETH_DST_DIR}/BuildInfo.h.tmp")
diff --git a/cmake/templates/BuildInfo.h.in b/cmake/templates/BuildInfo.h.in
index 6c16e4ac..4b35df98 100644
--- a/cmake/templates/BuildInfo.h.in
+++ b/cmake/templates/BuildInfo.h.in
@@ -8,3 +8,5 @@
#define ETH_BUILD_PLATFORM "@ETH_BUILD_PLATFORM@"
#define SOL_VERSION_PRERELEASE "@SOL_VERSION_PRERELEASE@"
#define SOL_VERSION_BUILDINFO "@SOL_VERSION_BUILDINFO@"
+#define SOL_VERSION_COMMIT "@SOL_VERSION_COMMIT@"
+#define SOL_VERSION_PLATFORM "@SOL_VERSION_PLATFORM@"
diff --git a/libsolidity/interface/Version.cpp b/libsolidity/interface/Version.cpp
index 30923fc2..0d23f9c3 100644
--- a/libsolidity/interface/Version.cpp
+++ b/libsolidity/interface/Version.cpp
@@ -40,7 +40,8 @@ string const dev::solidity::VersionString =
string const dev::solidity::VersionStringStrict =
string(dev::solidity::VersionNumber) +
- (string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE));
+ (string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE)) +
+ (string(SOL_VERSION_COMMIT).empty() ? "" : "+" + string(SOL_VERSION_COMMIT));
bytes dev::solidity::binaryVersion()
{