| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There were a few assumptions about where the CMake build was being initiated from -- we should support the usual workflow of 'mkdir build && cd build && cmake ..'. In some ways it's not ideal that we output pre-processed files into the original source tree, but that's a problem for later.
The h5hut CMake build was making a few assumptions about being invoked within an autotools context (config.h, directory layout), but here it should be possible to build either as a CMake subproject or within autotools.
…irectories; misc improvements
…e; Further small improvements
…nd/libspud; Remove some further unused variables; Misc changes.
…ith out-of-source build
… environment variable.
|
Given the massive changes included in the present branch, I have pushed another branch, called cmake_build_2022_minimal, which only contains a minimal changeset to allow for a CMake build and unit tests to successfully complete. Changes can be found here, and the associated successful Actions run here. To summarise the changes, there is now a CMakeLists.txt file within most of Fluidity's sub-directories that contain source files. Additionally, Python packages are now installed in the user site-packages directory and can be accessed within the Python interpreter without having to set the PYTHONPATH environment variable. Steps to build Fluidity from a fresh Jammy 22.04 installation are detailed in docker/Dockerfile.jammy. Packages are downloaded from the official Ubuntu package repositories using the latest versions available (e.g. VTK 9.1), except for GMSH and PETSc. The former is downloaded from the official website as a pre-built binary, while the latter is first cloned from the official release branch hosted on GitLab and then built. Configure- and build-time instructions are mostly found in the CMakeLists.txt file at the root of Fluidity's directory. Programs/packages marked as required include HDF5, MPI, NetCDF, PETSc, Python 3, sed, TCMalloc, UDUNITS and VTK. Additionally, a few libraries are fetched over the network: libspatialindex is downloaded from the official GitHub repository and seamlessly integrated into Fluidity's build as it also uses CMake, while Judy and Zoltan are downloaded from their respective SourceForge and GitHub repositories and built according to provided instructions. The only environment variables required to be set by the user are PETSC_ARCH and PETSC_DIR. Questions, comments, feedback and suggestions are all very much welcomed. |
Sorry, something went wrong.
|
Thanks for your work on this! I recommend switching the PR to the minimal branch, because this one is impossible to do a meaningful review on. I do think that having a CMake build system available is worthwhile, even just to avoid make makefiles! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I am opening this PR to discuss a possible addition of a CMake build to Fluidity as an alternative to Autotools.
The main motivation is the deprecation by CMake of the command-line argument --find-package (more details here) that was used in #125 to fix #113. This deprecation complicates building against recent VTK libraries using Autotools. Overall, it might be valuable to support CMake to avoid such issues, even though it is not impossible it brings issues of its own.
I will write the content of the PR later using the tree of file changes GitHub provides, summarising the changes I have made building on @jrper original build described in #115.
By no means the present PR should be merged as-is. If a CMake build is to be included in Fluidity, changes from this branch will likely be ported to another branch through targetted commits.
Useful URLs: