objectbox / objectbox-c

C and C++ database for objects and structs
https://objectbox.io/
Apache License 2.0
211 stars 37 forks source link

compile ObjectBox without examples #33

Open LIJOIGNATIUS opened 1 year ago

LIJOIGNATIUS commented 1 year ago

I'm looking to compile ObjectBox without including the examples and test apps. Essentially, I want to keep only the ObjectBox library in my environment.

It would be great if you could consider adding an option to remove examples when using the FetchContent_MakeAvailable command.

This way, users would have the flexibility to exclude example programs from the build process, reducing unnecessary build time and keeping the project clean and concise

greenrobot commented 1 year ago

Isn't this exactly what https://cpp.objectbox.io/installation describes? Let us know if we can improve the docs...

LIJOIGNATIUS commented 1 year ago

I apologize for the late response. I had a tight schedule and I just got a chance to check the thread.

Following the instructions, CMake will fetch the objectbox-c repository from GitHub. This includes the example programs, which I don't want to run. To avoid this, I need to manually remove or comment out the example directory in the CMakeLists.txt file.

gf3 commented 11 months ago

opened PR #37 to address this issue, as it was preventing compilation in a project for me