-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version.h header with information about the library version
- Loading branch information
Showing
5 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ values = | |
rel | ||
|
||
[bumpversion:file:CMakeLists.txt] | ||
[bumpversion:file:include/ethash/version.h] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. | ||
* Copyright 2019 Pawel Bylica. | ||
* Licensed under the Apache License, Version 2.0. | ||
*/ | ||
|
||
#pragma once | ||
|
||
/** The ethash library version. */ | ||
#define ETHASH_VERSION "0.4.2" | ||
|
||
#if __cplusplus >= 201103L | ||
namespace ethash | ||
{ | ||
/// The ethash library version. | ||
constexpr auto version = ETHASH_VERSION; | ||
|
||
} // namespace ethash | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// ethash: C/C++ implementation of Ethash, the Ethereum Proof of Work algorithm. | ||
// Copyright 2019 Pawel Bylica. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
#include <ethash/version.h> | ||
|
||
#include <gtest/gtest.h> | ||
|
||
TEST(libethash, version) | ||
{ | ||
static_assert(sizeof(ethash::version) >= 6, "incorrect ethash::version"); | ||
|
||
EXPECT_EQ(ETHASH_VERSION, TEST_PROJECT_VERSION); | ||
EXPECT_EQ(ethash::version, TEST_PROJECT_VERSION); | ||
} |