-
Notifications
You must be signed in to change notification settings - Fork 12
readme: document most important CMake options #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For example, to build a shared driver library (no static library) in release mode and integration tests you can do: | ||
```shell | ||
mkdir build | ||
cd build | ||
cmake -DCASS_BUILD_STATIC=OFF -DCASS_BUILD_INTEGRATION_TESTS=ON -DCMAKE_BUILD_TYPE=Release .. | ||
make | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Can you confirm that the following builds a static driver library (no shared) in release mode and links it against integration tests?
mkdir build
cd build
cmake -DCASS_BUILD_SHARED=OFF -DCASS_BUILD_INTEGRATION_TESTS=ON -DCASS_USE_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release ..
make
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so, let's add this as another example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, just by looking at the command I would confirm. However, when I checked by running it - it does not work.. It's because it does not work even with just -DCASS_BUILD_SHARED=OFF
in general..
The error:
CMake Error at scylla-rust-wrapper/CMakeLists.txt:16 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:scylla_cpp_driver_shared>
No target "scylla_cpp_driver_shared"
Call Stack (most recent call first):
scylla-rust-wrapper/CMakeLists.txt:52 (create_copy)
CMake Error at scylla-rust-wrapper/CMakeLists.txt:16 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:scylla_cpp_driver_shared>
No target "scylla_cpp_driver_shared"
Call Stack (most recent call first):
scylla-rust-wrapper/CMakeLists.txt:52 (create_copy)
CMake Error at scylla-rust-wrapper/CMakeLists.txt:16 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:scylla_cpp_driver_shared>
No target "scylla_cpp_driver_shared"
Call Stack (most recent call first):
scylla-rust-wrapper/CMakeLists.txt:52 (create_copy)
CMake Error at scylla-rust-wrapper/CMakeLists.txt:16 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:scylla_cpp_driver_shared>
No target "scylla_cpp_driver_shared"
Call Stack (most recent call first):
scylla-rust-wrapper/CMakeLists.txt:52 (create_copy)
This needs to be investigated. I'll open an issue.
However, if you execute the command you provided while removing -DCASS_BUILD_SHARED_LIBS=OFF
, it works as expected - it builds integration tests library linked against static driver library. The only difference is that shared library is still being built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this one. If the issue upon build with shared lib turned off is not solved soon, I'll mention it in MAINTENANCE.md in a separate PR.
Pre-review checklist
.github/workflows/build.yml
ingtest_filter
..github/workflows/cassandra.yml
ingtest_filter
.