You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we build/install everything in one CMake project: C++/Fortran with different compilers, Python etc. This has several draw-backs:
We want static libraries, but for python we need also the shared libraries, which requires to build static and shared in the same CMake project as well and introduces a complicated dependency on configuration options.
I suggest the following steps:
For the core we build either shared or static switched by the standard CMake variable BUILD_SHARED_LIBS.
Allow to install static and shared to the same location but with 2 different target files. The SerialboxConfig.cmake will be installed by both and checks which target files are available (static/shared/both) and makes them available in different namespaces, e.g. Serialbox::static::serialbox. (Maybe with a default Serialbox::serialbox pointing to one of them.)
Fortran bindings are installed afterwards, using the serialbox core installation.
Python as well (which is probably just a copy and maybe a CMake config).
A superbuild can drive installation of all combinations (if no proper package manager is available).
This has the advantage that core can be installed with e.g. only the GNU toolchain, but Fortran bindings can be installed with different Fortran compilers, without having to hack the toolchains and supporting complicated module environments as we do today (e.g. using gnu for c++, but Cray for Fortran).
Currently we build/install everything in one CMake project: C++/Fortran with different compilers, Python etc. This has several draw-backs:
We want static libraries, but for python we need also the shared libraries, which requires to build static and shared in the same CMake project as well and introduces a complicated dependency on configuration options.
I suggest the following steps:
BUILD_SHARED_LIBS
.Serialbox::serialbox
pointing to one of them.)This has the advantage that core can be installed with e.g. only the GNU toolchain, but Fortran bindings can be installed with different Fortran compilers, without having to hack the toolchains and supporting complicated module environments as we do today (e.g. using gnu for c++, but Cray for Fortran).
Any comments? @wdeconinck @clementval @cosunae
The text was updated successfully, but these errors were encountered: