Skip to content

Commit e42aa31

Browse files
committed
Update cmake-test readme for CURL tests.
1 parent 1a76752 commit e42aa31

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

cmake-tests/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,38 @@ Additionally, certain variables must be forwarded to each test project CMake con
5555
|--------------------|---------------------------------------------------------------------------------------------------------|
5656
| `Boost_DIR` | Path to boost CMAKE configuration. Example: 'C:\local\boost_1_87_0\lib64-msvc-14.3\cmake\Boost-1.87.0' |
5757
| `OPENSSL_ROOT_DIR` | Path to OpenSSL. |
58+
| `CMAKE_EXTRA_ARGS` | Additional CMake arguments to pass to the SDK configuration. Example: '-DLD_CURL_NETWORKING=ON' |
59+
| `CURL_ROOT` | Path to CURL installation (required when building with `-DLD_CURL_NETWORKING=ON`). |
60+
| `CMAKE_PREFIX_PATH`| Additional paths for CMake to search for packages (often set to `CURL_ROOT` for CURL builds). |
61+
62+
## Testing with CURL Networking
63+
64+
The SDK can be built with CURL networking support instead of the default Boost.Beast/Foxy implementation
65+
by passing `-DLD_CURL_NETWORKING=ON` to CMake. To test the CMake integration with CURL enabled:
66+
67+
1. Set the environment variables before running the configuration script:
68+
```bash
69+
export CMAKE_EXTRA_ARGS="-DLD_CURL_NETWORKING=ON"
70+
export CURL_ROOT=/path/to/curl # or /usr on most Linux systems
71+
export CMAKE_PREFIX_PATH=$CURL_ROOT
72+
./scripts/configure-cmake-integration-tests.sh
73+
```
74+
75+
2. Build and install the SDK:
76+
```bash
77+
cmake --build build
78+
cmake --install build
79+
```
80+
81+
3. Run the integration tests:
82+
```bash
83+
cd build/cmake-tests
84+
ctest --output-on-failure
85+
```
86+
87+
The `launchdarklyConfig.cmake` file will automatically detect and find CURL when the SDK was built
88+
with CURL support, using `find_package(CURL QUIET)`. This allows downstream projects using
89+
`find_package(launchdarkly)` to work seamlessly whether the SDK was built with CURL or Boost.Beast.
5890

5991
## Tests
6092

0 commit comments

Comments
 (0)