Skip to content
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

build: use find_dependency() instead find_package() in config file #2505

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tchaikov
Copy link
Contributor

SeastarDependencies.cmake is used in two scenarios:

  • configure Seastar library, when building Seastar itself.
  • configure Seastar library, when a parent project tries to
    detect Seastar library. when building the Seastar application.

in the second case, we should respect the "REQUIRED" and "QUIET"
options passed to find_package(Seastar). and CMake provides
find_dependency() macro for this purpose.

in this change, we conditionally call find_dependency() when
SeastarDependencies.cmake is used when this script is called
when finding Seastar library. this provides a better developer
experience to Seastar developers.

the loop and the helper variables do not help with the maintainability.
the intention was to split the data and code, but it hurts the
readability.

in this change, we

- remove the helper of `seastar_set_dep_args()`
- add a helper of `seastar_find_dep()`. it will be used for
  adapting to `find_dependency()` in `SeastarConfig.cmake.in`
- take this opportunity to add space before `(` to be consistent
  with the style in this file.

Signed-off-by: Kefu Chai <[email protected]>
SeastarDependencies.cmake is used in two scenarios:

- configure Seastar library, when building Seastar itself.
- configure Seastar library, when a parent project tries to
  detect Seastar library. when building the Seastar application.

in the second case, we should respect the "REQUIRED" and "QUIET"
options passed to `find_package(Seastar)`. and CMake provides
`find_dependency()` macro for this purpose.

in this change, we conditionally call `find_dependency()` when
`SeastarDependencies.cmake` is used when this script is called
when finding Seastar library. this provides a better developer
experience to Seastar developers.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
Copy link
Contributor Author

@scylladb/seastar-maint hello maintainers, could you help review this change?

1 similar comment
@tchaikov
Copy link
Contributor Author

@scylladb/seastar-maint hello maintainers, could you help review this change?

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 this pull request may close these issues.

1 participant