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 static library build option to cmake scripts #59

Open
saki7 opened this issue Dec 8, 2016 · 4 comments
Open

Add static library build option to cmake scripts #59

saki7 opened this issue Dec 8, 2016 · 4 comments

Comments

@saki7
Copy link
Contributor

saki7 commented Dec 8, 2016

It would be nice to have an option to switch static/shared build by the option -DBUILD_SHARED_LIBS=(ON|OFF).

Maybe I could send a pull request for this one when I have some time (I'm kinda busy right now).

@zussel
Copy link
Owner

zussel commented Dec 9, 2016

That's I was thinking about providing static libraries a few weeks ago. I was also considering splitting liboos into

  • liboos-core
  • liboos-sql
  • liboos-orm
  • liboos-utils
  • liboos-unit

What do you think?

Btw: I'm quiet thankful for reviewing and commenting my code/project 😄 !

@saki7
Copy link
Contributor Author

saki7 commented Dec 9, 2016

Hmm... It's your choice to splitting the library files, but, I like the idea. 😄
The re-compiling time should get much smaller when the each library gets bigger.
Maybe we should create a CMake script FindOOS.cmake to provide CMake users a small convinience for linking.

By the way, what do you think of introducing the boost library into the project?

Pros:

  • The installation is easy. Just few steps to follow. And there's also FindBoost.cmake
  • The library is very reliable and robust. It's a sub-standard library of the core C++ language. Many parts of the boost library has been ported into the standard.
  • There's still many missing features even in C++14 - the library will be a great friend for us.

Cons:

  • Adds one external dependency to OOS
  • It bursts the compilation time when you use certain sub-libraries
    • This can be partially avoided if the library is split into multiple shared/static objects
    • Convenience > build time IMO

I'm quiet thankful for reviewing and commenting my code/project!

np, I'm enjoying playing with this library so much.

@zussel
Copy link
Owner

zussel commented Dec 9, 2016

So I'll split the lib after the next release (for the next release). FindOOS.cmake would be great. What do you think of setting up two additional github projects:

  • oos-example with a simple example project.

and

  • oos-seed as a starting point for any new project based on OOS.

As for boost I didn't plan to integrate it at the moment. Right now I see no need for the library. I want to keep dependencies as low as possible in first place. If one time boost comes with a feature I think I absolute must have, I will decide new.

I think you're the first playing that intensively with OOS 😄

@saki7
Copy link
Contributor Author

saki7 commented Dec 9, 2016

oos-example looks very nice (much much better than looking into test codes), but when it comes to oos-seed it seems quite heavy though - what kind of features are you actually planning to provide? Something like a project-generator?

You know, it's hard to implement a project generator or project prototype for a C++ project - since the naming convention and code formatting rules varies so much among the developers.

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