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

Add CMake options to disable building tests and examples #73

Closed
tocic opened this issue Oct 1, 2022 · 2 comments
Closed

Add CMake options to disable building tests and examples #73

tocic opened this issue Oct 1, 2022 · 2 comments

Comments

@tocic
Copy link
Contributor

tocic commented Oct 1, 2022

When building the library using

cmake -B build/ -S .
cmake --build build/

examples and tests are also built. Is it possible to add CMake options for disabling that (see, e.g., google benchmark)? It's useful for packaging.

@martinus
Copy link
Owner

I'm bad with cmake, if you are still interested could you do a PR?

@tocic
Copy link
Contributor Author

tocic commented Feb 17, 2023

Actually, I found out that thanks to #60 you can avoid building tests and examples via building only the nanobench target:

cmake --build "build/" --target "nanobench"

It will not eliminate the configuration step for other targets, but that's not critical. Also, it'd be nice to be able to create dynamic and header-only versions of the library with CMake, but those are separate issues.

@tocic tocic closed this as completed Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants