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

Question: make subunit dependency explicit #324

Open
dernasherbrezon opened this issue Feb 16, 2021 · 1 comment
Open

Question: make subunit dependency explicit #324

dernasherbrezon opened this issue Feb 16, 2021 · 1 comment

Comments

@dernasherbrezon
Copy link

Currently subunit dependency checked during the configuration step. If subunit exists, then libcheck will have a dependency on it. If not, then there will be no dependency.

However this might bring some instability to the build (builds will be not reproducable). Consider the scenario:

  • configure and build check
  • subunit dependency is missing. libcheck builds fine, but without subunit
  • install subunit
  • build any third party code with subunit dependency and libcheck. It should fail.

Another downside of the current approach: subunit is linked even if it was not used (transitive dependency).

I was wondering if the following scenario makes sense:

  • Setup optional cmake parameter: "ENABLE_SUBUNIT"
  • If parameter is defined, then search for subunit (somewhere here https://github.com/libcheck/check/blob/master/CMakeLists.txt#L396 )
  • If subunit cannot be found, then fail the build
  • If subunit found, then continue with subunit dependency
  • By default ENABLE_SUBUNIT=0 (libcheck can work pretty well without subunit).
@mikkoi
Copy link
Contributor

mikkoi commented Feb 16, 2021

I agree. This needs to be added to CMake build.

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

No branches or pull requests

2 participants