optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
116 stars 33 forks source link

Improve CMake configuration #399

Closed andrea-iob closed 1 year ago

andrea-iob commented 1 year ago

I tried to improve and modernize CMake configuration files. Most changes are transparent because only affect how we interact with CMake. However, there are some visible changes:

andrea-iob commented 1 year ago

I forgot to say that now bitpit defines the bitpit::bitpit imported target. The target allows external projects to use the bitpit library using the following syntax:

find_package(bitpit)
target_link_libraries(external_target PRIVATE bitpit::bitpit)
marcocisternino commented 1 year ago

Just a remark not directly related to this pull request. When PETSc is found compiled with MPI, cmake is not able to make PETSc pass the tests because MPI is OFF by default. To recover, the user has to turn BITPIT_ENABLE_MPI ON and to turn PETSC_CURRENT OFF before re-configuring. Usually, PETSc is compiled with MPI support on all HPC clusters, we could think to change BITPIT_ENABLE_MPI default to ON. It is just a proposal.

andrea-iob commented 1 year ago

MPI support is now enabled by default.