Skip to content

cmake -DCASS_BUILD_SHARED=OFF fails #308

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

Closed
muzarski opened this issue May 30, 2025 · 1 comment · Fixed by #310
Closed

cmake -DCASS_BUILD_SHARED=OFF fails #308

muzarski opened this issue May 30, 2025 · 1 comment · Fixed by #310
Assignees

Comments

@muzarski
Copy link
Contributor

muzarski commented May 30, 2025

CASS_BUILD_SHARED option is ON by default. It's responsible for controlling whether shared driver library is being built (.so)

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)
@wprzytula
Copy link
Collaborator

@syuu1228 I can see that the CMakeLists.txt that you created does not support CASS_BUILD_SHARED = OFF correctly. Could you please fix this?

syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 2, 2025
The current CMakeLists.txt contains a bug that causes the error
`No target "scylla_cpp_driver_shared"` when CASS_BUILD_SHARED is
set to OFF.
To fix this, we need to avoid defining scylla_cpp_driver_shared when
CASS_BUILD_SHARED is set to OFF.

Same on scylla-cpp-driver_static.

Fixes scylladb#308
syuu1228 added a commit to syuu1228/cpp-rust-driver that referenced this issue Jun 2, 2025
The current CMakeLists.txt contains a bug that causes the error
`No target "scylla_cpp_driver_shared"` when CASS_BUILD_SHARED is
set to OFF.
To fix this, we need to avoid defining scylla_cpp_driver_shared when
CASS_BUILD_SHARED is set to OFF.

Also need to do same on static binary definition.

Fixes scylladb#308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants