-
Notifications
You must be signed in to change notification settings - Fork 214
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
Add cmake files for clang/mac/darwin/arm64 #1234
Add cmake files for clang/mac/darwin/arm64 #1234
Conversation
#if defined(TEST_WITH_SVG) | ||
// Define before including any buffer headerfile | ||
#define BOOST_GEOMETRY_BUFFER_USE_HELPER_POINTS | ||
#endif |
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.
(unrelated small change, it's not used anymore)
The tests in |
You shouldn't be adding the Boost root to the include path. When using CMake, we don't rely on the symbolic links created by You also need to make your test executables dependencies of the global
If your test executables aren't dependencies of This is accomplished with
and then
Your test targets need to be prefixed with your project name, which is Consider adding CMake tests to your Github Actions (or other) CI. For an example, you can look at one of my libraries, e.g. Function: https://github.com/boostorg/function/blob/develop/.github/workflows/ci.yml |
Thanks for your comments and links! |
Hi @pdimov I updated it. I'm following the approach you did in
Because we had already too many dependencies (many were unused (extensions), optional (adaptations), I split those lists and cleaned it up. I hope that's OK for the super project as well. Some dependencies should never have been there, such as predef and endian. As a background: I didn't add these CMakeLists for the general purpose. Mainly because b2 didn't work anymore on my Mac, and CMake is more convenient anyway. So it's mainly for my own purpose and I'm quite dependent on it. But anyway, maybe it serves broader purpose, now that it is more generic. (It's not complete though) |
This looks largely correct to me. Optional dependencies are a hassle and I don't think you'll gain that much from removing them because many will still be there as transitive dependencies. But you could do it this way if you prefer. You are linking the tests to dependencies of Boost::geometry explicitly, which shouldn't be necessary because they'll be there as transitive dependencies. I assume you are using the unit test framework in header-only mode? The target to link to is |
Thanks again @pdimov This is in latest commit, and I added some folders which are also related to overlay algorithms. |
77c019a
to
9b99c84
Compare
9b99c84
to
e1e89e7
Compare
@vissarion I now removed the alternatives, because you had them removed as well in your PR. |
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! I am OK with changes. Also managed to build and run without errors on Ubuntu 22.04 with gcc version 12.2.0
Thanks for approving, this is very convenient (at least for me). |
I moved to a macbook and got several problems with Boost.Geometry unit tests, mainly:
Therefore, and because it is probably useful anyway, I added CMakeLists files for the tests I'm using most often.
The compilation can be more compatible with the other platforms by using
-ffp-contract=fast
This fixes most (but not all) of the floating point differences.
Please give your opinion about the CMake parts.