Commit 1b91f0a 1 parent 29ade17 commit 1b91f0a Copy full SHA for 1b91f0a
File tree 1 file changed +9
-19
lines changed
1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,13 @@ A C++20 compatible compiler. Code was only tested on x86_64.
23
23
24
24
### CMake
25
25
26
- add
27
- ``` cmake
28
- FetchContent_Declare(
29
- dice-hash
30
- GIT_REPOSITORY https://github.com/dice-group/dice-hash.git
31
- GIT_TAG 0.4.4
32
- GIT_SHALLOW TRUE)
33
-
34
- FetchContent_MakeAvailable(dice-hash)
26
+ ### conan
27
+ To use it with [ conan] ( https://conan.io/ ) you need to add the repository:
28
+ ``` shell
29
+ conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
35
30
```
36
31
37
- to your CMakeLists.txt
32
+ To use it add ` dice-hash/0.4.4 ` to the ` [requires] ` section of your conan file.
38
33
39
34
You can now add it to your target with:
40
35
``` cmake
@@ -43,27 +38,22 @@ target_link_libraries(your_target
43
38
)
44
39
```
45
40
46
- ### conan
47
- To use it with [ conan] ( https://conan.io/ ) you need to add the repository:
48
- ``` shell
49
- conan remote add dice-group https://conan.dice-research.org/artifactory/api/conan/tentris
50
- ```
51
-
52
- To use it add ` dice-hash/0.4.4 ` to the ` [requires] ` section of your conan file.
53
-
54
41
## build and run tests
55
42
56
43
``` shell
57
44
# get it
58
45
git clone https://github.com/dice-group/dice-hash.git
59
46
cd dice-hash
60
47
# build it
48
+ wget https://github.com/conan-io/cmake-conan/raw/develop2/conan_provider.cmake -O conan_provider.cmake
61
49
mkdir build
62
50
cd build
63
- cmake -DBUILD_TESTING -DCMAKE_BUILD_TYPE=Release ..
51
+ cmake -DBUILD_TESTING -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=conan_provider.cmake
64
52
make -j tests_dice_hash
65
53
./test/tests_dice_hash
66
54
```
55
+ Note: This example uses conan as dependency provider, other providers are possible.
56
+ See https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#dependency-providers
67
57
68
58
## usage
69
59
You need to include a single header:
You can’t perform that action at this time.
0 commit comments