| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,9 +23,16 @@ cmake .. -DBUILD_TESTS=true -DBUILD_EXAMPLES=true # library, tests and examples | |||
| 23 | 23 | make -j | |
| 24 | 24 | ``` | |
| 25 | 25 | ||
| 26 | - Then, you just have to link the `cpp_redis` library with your project. | ||
| 26 | + If you want to install the library in a specific folder: | ||
| 27 | 27 | ||
| 28 | - For building tests, it is necessary to install `google_tests`. Just run the `install_deps.sh` script which does the work for you. | ||
| 28 | + ```bash | ||
| 29 | + cmake -DCMAKE_INSTALL_PREFIX=/destination/path .. | ||
| 30 | + make install -j | ||
| 31 | + ``` | ||
| 32 | + | ||
| 33 | + Then, you just have to include `<cpp_redis/cpp_redis>` in your source files and link the `cpp_redis` library with your project. | ||
| 34 | + | ||
| 35 | + To build the tests, it is necessary to install `google_tests`. Just run the `install_deps.sh` script which does the work for you. | ||
| 29 | 36 | ||
| 30 | 37 | ## Redis Client | |
| 31 | 38 | `redis_client` is the class providing communication with a redis server. | |
@@ -55,7 +62,7 @@ Reply callback is an `std::function<void(reply&)>`. | |||
| 55 | 62 | ### Example | |
| 56 | 63 | ||
| 57 | 64 | ```cpp | |
| 58 | - #include "cpp_redis/cpp_redis.hpp" | ||
| 65 | + #include "cpp_redis/cpp_redis" | ||
| 59 | 66 | ||
| 60 | 67 | #include <signal.h> | |
| 61 | 68 | #include <iostream> | |
@@ -126,7 +133,7 @@ Unsubscribe from the given pattern. | |||
| 126 | 133 | ### Example | |
| 127 | 134 | ||
| 128 | 135 | ```cpp | |
| 129 | - #include "cpp_redis/cpp_redis.hpp" | ||
| 136 | + #include "cpp_redis/cpp_redis" | ||
| 130 | 137 | ||
| 131 | 138 | #include <signal.h> | |
| 132 | 139 | #include <iostream> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #include "cpp_redis/cpp_redis.hpp" | ||
| 1 | + #include <cpp_redis/cpp_redis> | ||
| 2 | 2 | ||
| 3 | 3 | #include <signal.h> | |
| 4 | 4 | #include <iostream> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #include "cpp_redis/cpp_redis.hpp" | ||
| 1 | + #include <cpp_redis/cpp_redis> | ||
| 2 | 2 | ||
| 3 | 3 | #include <signal.h> | |
| 4 | 4 | #include <iostream> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments