Change to CMake build system
Reported by Julien Bigot julien.bigot@cea.fr:
While installing SIONlib on my system (debian sid) I faced the following issue: on line 171, 172 of config/select-mpi.sh , the script is looking for a directory ${MLIBDIR}/openmpi that is absent on my system, instead I have ${MLIBDIR}/openmpi3
I have seen different related issues with recent Debian derived distros that have changed the file system layout w.r.t. where library files are placed. A sustainable solution involves moving to a third-party build system (i.e. #99 (closed) or similar) that includes auto-detect functionality that we do not have to maintain by ourselves.
Update: More reports of the build system not working as expected are coming in.
- JB reports he has to patch the build system to properly handle staged installs.
- JSC's SIONlib EasyConfigs patch the build system to recognize an MPI library that has been in use for over a decade on JSC systems.
- New employees cannot get SIONlib to build out of the box, because they explicitly have to specify an MPI configuration that is there, but is not documented and is not picked up automatically.
#99 (closed) is more than six years old now. DEV-CF-autotools
last had activity more than three years ago and that was a merge from the main
branch (then trunk
) and the creation of an empty directory.
I have created DEV-BS-cmake
to explore the use of a CMake based build system. So far, I have prototyped building the libraries and some (serial and parallel) utilities, building and running the test suite through ctest
. What is there now is in an early state and certainly a number of things are still missing, such as
- detection and use of optional dependencies (IME, SIONfwd),
- installation,
- source package creation (gotta hide them secrets),
- creation of the
tools
version, - etc.
On the other hand, it already offers benefits:
- auto-detection for MPI and OpenMP that works and does not have to be maintained by us,
- integration with modern tooling such as
clang-tidy
,include-what-you-use
,gcov
, that works and does not have to be maintained by us.