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

Is there a way to only build the wakaama library without building the examples nor the CUnit tests? #844

Open
nmatas-tdk opened this issue Jan 25, 2025 · 1 comment

Comments

@nmatas-tdk
Copy link

I'm trying to have the wakaama library as an external dependency in a cross platform embedded project. I don't want to have a dependency on CUnit because I won't be able to run the tests after building them (because is cross platform compilation) and I'm constrained in memory and storage space.
If I remove add_subdirectory(tests) from CMakelists.txt everything works fine for me, but I can't modify any file in the Wakaama directory because is a dependency as a submodule in git.

Would it be possible to have a CMake variable that removes the unit tests from the build? Something like set(WAKAAMA_TESTS OFF) that I can include in my client code CMakelists.txt

Or alternatively, create a wakaama_lib directory and build the library alone and have a different directory for the complete build with the tests?

Thank you!

@LukasWoodtli
Copy link
Contributor

If you work with a recent version of the code in main then the CMake.txt in the project root directory does not depend on the examples. The examples include the main CMakeLists.txt but not the other way around.

Regarding the tests. Check out this PR: #851

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