lexborisov / myhtml

Fast C/C++ HTML 5 Parser. Using threads.
GNU Lesser General Public License v2.1
1.66k stars 147 forks source link

Changing modules management #130

Closed vallahaye closed 6 years ago

vallahaye commented 6 years ago

The idea would be to put each modules (mycore myencoding ...) into their own repositories and then use cmake-get to pull and build modules when needed. cmake-get is a pure Cmake implementation of cget which allows you to handle dependencies like npm or yarn would do directly using Cmake. Implementing this solution would let you do versioning on common modules like mycore which are copy-pasted in both myhtml mycss and Modest. Tell me what you think about this idea. I'm also open for helping you implementing the solution if you're okay with it.

Thanks in advance.

lexborisov commented 6 years ago

Hi! Good idea, but Make is a basic build system. It will be difficult to implement this using only Make.

vallahaye commented 6 years ago

Yes it would be difficult (yet not impossible) to port this functionality to Make but having this as a Cmake only feature seems good to me. More over, what's the real advantage in maintaining two ways of building the library ? Now our days Cmake is pretty much everywhere so I think going Cmake only clearly makes sense 👍 Maybe we can still keep submodules inside the source folder while still implementing the cmake-get solution just as a transition to see what you think of it.

data-man commented 6 years ago

I prefer to use premake5 or tup.

vallahaye commented 6 years ago

@data-man It's a question of taste. Those two clearly mark some points but I'm addicted to the fact that thousands of people uses Cmake everyday which makes it so easy to find help when needed. Also myhtml already uses Cmake (and Cpack) so I'm not a great fan of replacing it with something else, knowing that the problem (module dependencies) can already easily be solved with Cmake.

data-man commented 6 years ago

@vallahaye Why not provide several ways for the building? Let users choose what is best for them.

vallahaye commented 6 years ago

@data-man You're right, I though you proposed to replace Cmake with premake or tup. I've nothing against having multiple build systems cohabiting 👍 But back to the subject, this issue is about code refactoring and adding dependency management to Cmake which is already in place. Maybe you should open your own issue to request premake build support ?

data-man commented 6 years ago

@vallahaye

Maybe you should open your own issue to request premake build support ?

Yes, when the repositories will be divided.

vallahaye commented 6 years ago

@lexborisov Any news onto this ?

lexborisov commented 6 years ago

@vallahaye I'm still thinking about this. As soon as I make a decision, I'll write about it here.

lexborisov commented 6 years ago

In the current project, nothing will change with the build system. Perhaps I will use this approach in a new project: lexbor.

Thanks!