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

optional and test dependencies/targets #120

Open
4 tasks
ryanmrichard opened this issue Sep 13, 2023 · 0 comments
Open
4 tasks

optional and test dependencies/targets #120

ryanmrichard opened this issue Sep 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ryanmrichard
Copy link
Collaborator

ryanmrichard commented Sep 13, 2023

Is your feature request related to a problem? Please describe.
Having dependencies/targets which are only built sometimes is pretty common. Examples are dependencies/targets needed only for testing and dependencies/targets for optional features. Handling these "sometimes" objects introduces additional logic into the CMakeLists.txt which could be avoided by tagging the object as optional/testing. It's worth noting that the distinction between optional and testing boils down to whether they are installed or not (testing is usually not installed).

Describe the solution you'd like
A brute force approach would be to do something like:

cmaize_find_or_build_xxx_yyy(
)

where xxx would be optional or testing and yyy would be dependency, library, or executable.

Describe alternatives you've considered
Using control flow logic in my CMakeLists.txt files.

From #121:

  • Add cmaize_find_or_build_test_dependency
  • Add cmaize_add_test_library
  • Add cmaize_add_test_executable
  • Add cmaize_add_test (have cmaize_add_tests redirect to it)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant