-
Notifications
You must be signed in to change notification settings - Fork 23
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
Using installed version OpenCASCADE #87
Conversation
@bschwind What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @katyo, this is indeed a very useful change. I posted some thoughts/suggestions for the implementation. We've also working on #86 with @bschwind. I'm happy to rebase/adapt this if #86 lands sooner.
BTW this could be even a solution for slow CI - at least the Ubuntu runner provides opencascade in the repository.
@bschwind I rebased this PR to current master. Maybe we should enable |
e297b8f
to
2829cb8
Compare
I've been delayed in reviewing this but I'll give it a try soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just adding some nits.
Maybe we should enable builtin feature by default
Yes, please, on opencascade
level.
0bfaf52
to
1db87f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good, just need a few tweaks:
- Fix the build errors
- Fix the clippy warnings (we run
cargo clippy --release --all-targets -- -D warnings
in CI)
Could you also add a bit of documentation in the README on how to use the bundled OCCT, vs. using the system-installed one?
e99cb3c
to
251153c
Compare
Yeah this should work! We'd just need to provide a good error message in case the version doesn't check with the builtin feature (basically say that the developers are to blame, that's not on the user side). |
808745d
to
4164df4
Compare
@katyo could you please rebase this on the latest |
@bschwind Does this mean that OCCT 7.7.1 is a minimum supported version? |
56090d3
to
7bb9e21
Compare
@bschwind Currently CI won't work as expected when occt-sys needs to be updated too. Hope such behavior was predictable. |
@katyo that's okay! I see what you mean, we need to update
Unfortunately yes. We could go back and see when exactly the I can help to support this PR and get it through, as I currently have the publishing rights to |
@bschwind Any chance that this PR will be merged soon? |
Hi @katyo , yes I still want to get to this for sure. I've been on a two week trip so development and review has been a bit slow. This PR is the next one I want to test so I'll update you here when I've done so. Sorry for the wait! |
7bb9e21
to
caf43f9
Compare
This commit uses cmake to find installed OpenCASCADE libraries in system. If it found it will be used if it version fits to requirements. Otherwise the builtin one will be used. The `builtin` feature may be enabled to force use builtin OpenCASCADE.
caf43f9
to
cf0bfe9
Compare
@strohel could I get another review from you on this? Especially concerning the newly added Also, I excluded |
@katyo I'm back from the trip I was on. I pushed some changes to your branch and published 0.3 of occt-sys to get this building. Thanks so much for your patience! Please take a look at the changes and let me know if you agree with them. I've tested this fairly thoroughly and things are working well! Interestingly, I seem to get better performance when using the builtin version of OCCT. Anecdotally on my mac mini m1, the keycap model takes:
|
Are you sure that this works as expected? |
@katyo I tested it with Dynamic Linking
Static Linking
|
@bschwind Seems it works as expected. |
@katyo were you having trouble making it work on linux? I can test it out on a linux machine today too. |
@bschwind No, it works fine for me (NixOS). I think it shouldn't have problems with other distros either. Maybe we won't get significant speedup using dynamic linking itself but using pre-installed OCCT allows skip building it which takes several minutes on my laptop. |
This PR adds support installed version of OpenCASCADE library when it found and fits prerequisites. This drastically speeds up build. You can use
builtin
feature to prefer builtin version and skip detecting installed one.Also added support for dynamic linking via using
dynamic
feature so this PR also superseeds #26.