-
Notifications
You must be signed in to change notification settings - Fork 52
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
Initial CMake support #929
Conversation
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.
Really nice work! Thank you very much! Looks very promising so far!
Would you please substitute all leafs
with leaves
and also merge in the latest main
? We just made this global change in t8code. Some files got renamed by this.
When building the 116 unit tests, I noticed that not all of them pass. From my limited understanding of the code base, I think that these failing tests are inherited from p4est and sc, but 2 that I ported myself fail. However, the pipeline passes as it uses the autotools BS... |
@dutkalex I could successfully build t8code with your cmake scripts. Nice work! Indeed, not all tests pass on my machine, too!
The following error message sprang into my eye skimming through the output log of the failed tests: Also some mesh files are not found. |
The zlib part is managed by the existing p4est & sc CMake build system which does strange things at times on my machine too. Maybe I will try to fix this in the future but it is outside of the scope of this PR IMO. I will investigate the 2 t8_gtest_*** which fail and this mesh file thing. Thx for the feedback! 🙃 EDIT: The missing mesh stuff is also on the p4est side it seems... |
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 for you effort! Very educational reading you cmake scripts!
It would be nice if we could replicate the folder structure in the INSTALL_PREFIX as done with the old autotools build system. For example, we have bindings generators for e.g. Julia which assume this structure.
Let me know if you need more info!
@jmark What install directory structure is needed exactly? As of this comment it just contains |
Also, what is your policy regarding documentation? Where do you want me to document how to use the CMake BS? In a new section in the |
As I can't make a clean PR for the wiki, here is the documentation for the CMake installation. I would also replace the first paragraph in the
|
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
This looks to me like a "chicken and the egg" situation: if we want to integrate into
Oh ok! I did not understand that you plan on replacing the autotools build system with this one! I though of this work more as an alternative community-driven build system, as in
Yes and I think it is a good thing! I was pointing this out because the PR is already starting to get big (400+ LoC), and I am already pretty sure that new unit tests have been added since I did the porting! I think it would be better to merge this more or less as is, while being explicit about the fact that this in not yet production-ready, let people add their tests in both the autotools and cmake build systems, figure out together the edge cases as people start to use it, and improve it incrementally with additional PRs until we are confident enough to remove the experimental label... |
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.
@dutkalex Please consider these code changes. Other than that LGTM so far!
Agree, the changes in this PR are non-intrusive.
So, in accordance with the other core developers, here is the plan: We leave the PR now as it is. A lot of stuff is already working and it is pretty much usable. We mark it as experimental and let it evolve slowly by incrementally adding new features one by one. At some point we can make the final switch and finally get rid of autotools for good. Thanks @dutkalex for getting this project rolling! |
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Good news @jmark ! I have included verbatim your proposed changes as everything looked fine. Don't hesitate to tag me in future PRs about the build system, I'd be happy to continue helping if I can 🙃 |
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.
@dutkalex One final edit to do. There were some file renamings just yesterday. Good timing! Sorry. But with this we can finally merge.
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Co-authored-by: Johannes Markert <10619309+jmark@users.noreply.github.com>
Done. @jmark |
Just for the record: #954 |
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.
Let's do it!
Describe your changes here:
This PR is a MVP candidate for CMake build support in t8code. Currently supports building the main library, the tests, the examples and the tutorials.
All these boxes must be checked by the reviewers before merging the pull request:
As a reviewer please read through all the code lines and make sure that the code is fully understood, bug free, well-documented and well-structured.
General
The reviewer executed the new code features at least once and checked the results manually
The code follows the t8code coding guidelines
New source/header files are properly added to the Makefiles
The code is well documented
All function declarations, structs/classes and their members have a proper doxygen documentation
All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue)
Tests
Github action
The code compiles without warning in debugging and release mode, with and without MPI (this should be executed automatically in a github action)
All tests pass (in various configurations, this should be executed automatically in a github action)
If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):
Scripts and Wiki
script/find_all_source_files.scp
to check the indentation of these files.Licence
doc/
(or already has one)