PyMesh / carve

Automatically exported from code.google.com/p/carve
Other
17 stars 10 forks source link

Update cmake to support win builds #83

Open ngodber opened 3 years ago

ngodber commented 3 years ago

@qnzhou and @folded I'd really appreciate a review on the changes I made to get carve building on msvc. This work is in prep for creating a conda-forge feedstock for this great library to hopefully make it and pymesh more accessible.

folded commented 3 years ago

I'm not certain that I trust building windows DLLs. Generally speaking C++ dynamic objects on all platforms need careful thought. I'm also not sure I know why you would want to do this, unless PyMesh uses ctypes to access carve. It would be better to statically compile carve into the python module that is itself a DLL, but only has to expose C symbols.

ngodber commented 3 years ago

@folded thanks for the feedback. Assuredly this is fairly new ground for me so I can't comment on static vs dynamic. Am I right in thinking the issue is around ABI? The last package I submitted to conda forge the reviewer indicated that conda forge prefers dynamic libs. My guess is that given packages are all built using the same compiler architecture ABI isn't a concern. Although im doing this in order to package pymesh, carve will be packaged independently so that other projects can make us of it. I can setup the build to provide static and dynamic libs in the package.

ngodber commented 3 years ago

https://github.com/PyMesh/PyMesh/issues/302 the broader effort is here.

ngodber commented 3 years ago

@folded, beyond static vs dynamic, do you see any issues with the modifications made (most of which were around compiling with modern msvc)?

folded commented 3 years ago

I've considered switching carve to using bazel to build. Would that be of interest? I feel like - especially for c++ code - hermetic builds are a very sensible approach.

ngodber commented 3 years ago

@folded unfortunately bazel isn't support in conda-forge at this time though I am sure it will be added in time.

My primary goal is to substantially improve access to solid geometry libs from within python which, at time of writing, is poor. I just managed to get builds going though it ended up taking substantially more time than I had planned. I would hugely appreciate your review of the builds at https://github.com/conda-forge/staged-recipes/pull/15430. Unfortunately I've run out of time to finish pymesh build itself but I'm hoping another is willing to carry the ball forward!

ngodber commented 1 year ago

@folded are you interested in merging this? otherwise I'll nuke this branch and its associated conda-forge repo.