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
Use C++14, required for Boost 1.75+ #7
Conversation
But libnest2d doesn't require 1.75+. By default it takes 1.70. Cura uses v1.67 even. In those versions, the Geometry module doesn't require C++14 yet (it was deprecated from v1.73 onwards). If Boost 1.75+ requires C++14, it should require that in its CMake script, not in all of its users' CMake scripts. So I'd like to reject this pull request. But if the CMake script to find the Boost headers doesn't properly execute its CMake script there that would be something we need to look at in Ultimaker/libnest2d. We've been planning for a while to upgrade to C++17 for all of Cura's C++ code, which would also upgrade this code base and allow us to use newer features. From that moment on, pynest2d itself would require C++17. |
Would you be able to help me check how this works or why does it not work? |
Yeah, I can help a bit. Though I must say that libnest2d is not written by me or the Cura team. I've forked it for a small modification that Cura needed, but I'm not intimate with how it all works there. I'll try to write out my investigation... So libnest2d is supposed to have a modular structure where you can swap out the "geometry backend" between Clipper, Boost and Eigen: This then adds a subdirectory to the CMake script, depending on the selected backend: If Boost is selected, it would add the directory The weird thing here is this function It looks like this script intends to find the package on the system first, and if it's not present provide the option to download it automatically. But instead of just a find module and if it's not find an I'm not sure what happens there when it finds Boost 1.75 but the Boost 1.75 configure stage requires C++14. Boost doesn't use CMake but their B-Jam thing (or does it have CMake too nowadays?) so perhaps it would only fail when it actually tries to build Boost then. And then this never occurs because we don't build Boost here; we include its headers. If Boost doesn't have CMake to check for C++14 support, ideally this It's quite a mess, isn't it? |
Indeed, sound really complicated. Thanks for the analysis. I've resumed to |
As long as the distro can be assumed to have a C++14 compiler nowadays, that'll be fine. We are planning to switch to C++17 soon-ish. Several attempts have been made but since our MacOS build server is (intentionally) old, it's a bit of a problem. |
No description provided.