-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updating `conanfile` to use Conan v2 * Updated the build configuration to make the project compile/build again. * Build now succeeds * Updated the `$COMMON_UTILS/build` script too (massenz/common_utils`). * Fixed unit tests build * Fixed failing tests * Added `Bucket::operator==` and `Bucket::operator<` to fix a potential bug in the View class.
- Loading branch information
Showing
15 changed files
with
332 additions
and
260 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 |
---|---|---|
|
@@ -31,3 +31,4 @@ bin/test | |
.la | ||
|
||
cmake-build-debug | ||
logs/ |
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,9 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(MyProject) | ||
|
||
# Find the glog package installed by Conan | ||
find_package(glog REQUIRED) | ||
|
||
# Set up the target and link glog | ||
add_executable(use-glog src/examples/use_glog.cpp) | ||
target_link_libraries(use-glog PRIVATE glog::glog) |
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 |
---|---|---|
|
@@ -29,21 +29,42 @@ A detailed description of the library's features follows the [Install & build](# | |
|
||
## Build & testing | ||
|
||
The sequence of commands to build the project: | ||
|
||
```shell | ||
conan install . -s build_type=Debug --build=missing | ||
cmake --preset conan-debug -DCOMMON_UTILS=$COMMON_UTILS | ||
cmake --build --preset conan-debug -DCOMMON_UTILS_DIR=$COMMON_UTILS | ||
``` | ||
The build targets are currently just `distutils` lib and the `merkle_demo` and | ||
`keystore_demo` examples, in the `build/Debug` directory: | ||
|
||
```shell | ||
./build/Debug/merkle_demo "this is the string to hash" | ||
``` | ||
|
||
For the `Release` build, use the `conan-release` preset and `Release` build type. | ||
See [#Common utilities](#common-utilities) for a simpler way. | ||
|
||
### Common utilities | ||
|
||
The build/test scripts in this repository take advantage of shared common utility functions in [this common utils repository](https://bitbucket.org/marco/common-utils): clone it | ||
somewhere, and make `$COMMON_UTILS_DIR` point to it: | ||
The build/test scripts in this repository take advantage of shared common utility functions in | ||
[the Common Utils repository](https://bitbucket.org/marco/common-utils): follow the instructions there to install the utilities and | ||
set the `COMMON_UTILS` environment variable to point to the directory where you installed them. | ||
|
||
That is done as part of the installation process anyway: | ||
|
||
```shell | ||
git clone [email protected]:marco/common-utils.git | ||
export COMMON_UTILS_DIR="$(pwd)/common-utils" | ||
export COMMON_UTILS=/path/to/common-utils | ||
export VERSION=... | ||
curl -s -L https://cdn.githubraw.com/massenz/common-utils/$VERSION/install.sh | zsh -s | ||
``` | ||
|
||
To build/test the project, link to the scripts there: | ||
|
||
```shell | ||
ln -s ${COMMON_UTILS_DIR}/build.sh build && \ | ||
ln -s ${COMMON_UTILS_DIR}/test.sh test | ||
ln -s ${COMMON_UTILS_DIR}/build.sh bin/build && \ | ||
ln -s ${COMMON_UTILS_DIR}/test.sh bin/test | ||
``` | ||
|
||
### Build & Install libdistutils.so | ||
|
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
Oops, something went wrong.