Skip to content

Commit 86a9cc0

Browse files
authored
Merge pull request #307 from muzarski/readme-cmake-options
readme: document most important CMake options
2 parents a1d9d9d + 3f8c489 commit 86a9cc0

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ Wrapper around ScyllaDB's rust-driver compatible with Datastax cpp-driver.
44

55
#### Note: It is work in progress, bug reports and pull requests are welcome!
66

7+
# CMake options
8+
9+
In this section we will go over most important CMake options and what each of them controls.
10+
- `CASS_BUILD_SHARED` - Build shared driver library (.so). `ON` by default.
11+
- `CASS_BUILD_STATIC` - Build static driver library (.a). `ON` by default.
12+
- `CASS_BUILD_INTEGRATION_TESTS` - Build integration tests (see `Testing` section below) `OFF` by default.
13+
- `CASS_BUILD_EXAMPLES` - Build examples (see `Examples` section below). `OFF` by default.
14+
- `CASS_USE_STATIC_LIBS` - Link against static libraries when building tests/examples. `OFF` by default.
15+
- `CMAKE_BUILD_TYPE` - Controls the cargo profile library is built with. Possible values are: `Debug`, `RelWithDebInfo` and `Release`. Default value is `Debug`. For more information, see the profiles definitions in `scylla-rust-wrapper/Cargo.toml`.
16+
17+
For example, to build a shared driver library (no static library) in release mode and integration tests you can do:
18+
```shell
19+
mkdir build
20+
cd build
21+
cmake -DCASS_BUILD_STATIC=OFF -DCASS_BUILD_INTEGRATION_TESTS=ON -DCMAKE_BUILD_TYPE=Release ..
22+
make
23+
```
24+
725
# Examples
826
___
927

@@ -241,7 +259,7 @@ Now, use `--gtest_filter` to run certain integration tests:
241259
./cassandra-integration-tests --scylla --install-dir=[PATH_TO_SCYLLA] --version=3.0.8 --category=CASSANDRA --verbose=ccm --gtest_filter="ClusterTests.*"
242260
```
243261

244-
##### Note: Tests that pass with ScyllaDB and Cassandra clusters can be found in GitHub Actions [`build.yml`](https://github.com/scylladb/cpp-rust-driver/blob/master/.github/workflows/build.yml) and [`cassandra.yml`](https://github.com/scylladb/cpp-rust-driver/blob/master/.github/workflows/cassandra.yml) workflows.
262+
##### Note: Tests that pass with ScyllaDB and Cassandra clusters can be found in Makefile: `SCYLLA_TEST_FILTER` and `CASSANDRA_TEST_FILTER` env variables.
245263

246264
# Build rpm package
247265
___

0 commit comments

Comments
 (0)