Commit 2a88ed3
authored
tests: fix static link order (#478)
### What's done
Place the driver target before `CASS_LIBS` in `target_link_libraries`
for integration tests. With static linking the linker resolves symbols
left-to-right, so the archive providing symbols must precede the
libraries that define them.
It's fascinating that the bug comes from the DataStax CPP Driver's build
system. They must have never tested static linkage with integration
tests.
### Verification
```sh
cmake\
-DCASS_BUILD_INTEGRATION_TESTS=ON \
-DCASS_USE_STATIC_LIBS=ON \
-B build \
&& (cd build && make)
```
now works. Before, it would fails with undefined references to OpenSSL
symbols.
### Further work
#438 apart of containing this fix, introduced **a lot** of changes and
static linkage verification using the smoke test app. I'm working on
making the changes more granular, better documented, and hence mergable.
Fixes: #1641 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | 65 | | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments