Replies: 6 comments 9 replies
-
I took another look at GLM -- although it has GL in the name, it explicitly does not depend on <GL/gl.h>, <GL/glcorearb.h>, So my 2nd bullet above is moot. It is still true, but manifold has no problems passing that criteria because of GLM. |
Beta Was this translation helpful? Give feedback.
-
We are 100% ready to accept patches to improve our builds. I am very much not a CMake expert, and the main reason our builds work as well as they do is from excellent contributions from devs who know more about it than I do. For my part, I generally evaluate new approaches by how well they run on our Github Actions CI and what our others users say about their ease of use. @pca006132 knows more about our CMake than anyone at this point, so I trust his opinion. @kintel and @t-paul also have opinions on how to make Manifold easier to consume for OpenSCAD, and I would guess their desires largely fall in line with yours, but I'll let them use their own words. I think this is mostly about points 1 and 4. As you say, 2 is moot, and 3 we're already working on (removing Thrust) but we're not quite there yet and it currently supplies some algorithms we use even in single-threaded mode. |
Beta Was this translation helpful? Give feedback.
-
I somehow forgot to answer this one.
We are already doing something similar with tbb, but we use I wonder what is the benefit of using |
Beta Was this translation helpful? Give feedback.
-
Prebuilt binaries is obviously a no go for me (mobile, wasm, debugging, etc). One thing a bit annoying is that manifold pulls gtest and nanobind which aren’t useful for standard build. |
Beta Was this translation helpful? Give feedback.
-
From my point of view, the important thing (to enable use of system installed libraries) is more about how the libraries are referenced by other parts of the CMake system (vs. how the libraries themselves are built). Case 1) Library is discovered by FindPackage( foo ). This sets variables such as FOO_INCLUDE_DIRS and FOO_LIBRARIES which are then used where needed in CMake. Case 2) Library is included in project by AddSubdirectory( foo ).
In my experience, ExternalProject_Add() is the approach that best supports 1). |
Beta Was this translation helpful? Give feedback.
-
Yes, the fancy stuff is generically called "Modern CMake". It has been evolving since 3.0. Modern calls to FindPackage() will populate targets (instead of setting old-fashioned variables). If the sub-project being added uses targets, then I think that add_subdirectory will expose them in a very similar manner as would FindPackage() of it -- but I'm less confident of it than I am the other way. Even if this is true, you need to replace an add_subdirectory() with a FindPackage() in order to use a system-installed dependency. I prefer to use FindPackage() in both cases. |
Beta Was this translation helpful? Give feedback.
-
In my program, I generally follow the CMake 'SuperProject' pattern for my dependencies. I believe it offers some advantages over the current approach for Manifold.
Can you assess the feasibility in moving to this kind of system. If it is feasible, are you willing to accept patches in that direction?
First, a little background....
Here are the perceived problems I see that I think could be remedied with a SuperProject approach...
Manifold embeds some libraries that my project already embeds. Clipper2 (I'm still on Clipper1, but with intent to upgrade), and GLM. If Manifold used the SuperProject approach, I could tell it to use the system provided library and point it to the one I have already bundled.
My program needs to be able to build on computers with no graphics capability -- where the system has no graphics libraries installed, and graphical programs are not allowed. In my program, GLM is only used on the graphics side of things, so it can be disabled with a CMake flag and GLM is no longer required by the program. It may be that GLM just does math and doesn't actually require OpenGL or any other graphics libraries -- so perhaps this is moot, but if GLM is only needed by unit tests or demo programs, then I would encourage you to make the dependency dependent on the same CMake variable as controls building the tests and example programs.
Similarly, if I turn off the parallel build, it would be great if I didn't need to build the parallel library (thrust). Even better if I don't even have to download or have it in the first place. Thrust has its own dependencies (cub and libcudacxx, or TBB or OpenMP).
My program needs to be able to be built on computers with no connection to the internet. This means no build instructions that involve 'git clone', no submodules, and no ExternalProject_Add that points at a VCS. I need to be able to point them at a single *.zip file to download -- and that single file can be transferred to a computer without connectivity, where the program can be built (if required).
Beta Was this translation helpful? Give feedback.
All reactions