Skip to content

More CMake modernization #363

@LecrisUT

Description

@LecrisUT

While writing CMake-Template, and working on the octopus project, I have encountered a few improvements that should be included in the cmake project. First I want to finish and document CMake-Template about these practices, then I will port them here. Some of the changes are:

  • Make fortran, test etc. as their own sub-project. That would allow to build/install these projects on top of a built-in spglib library, e.g. the python bindings
  • Add CMAKE_MESSAGE_CONTEXT for better message navigation downstream
  • Add FeatureSummary for a nice output of the options enabled
  • Better packaging tests using native ctest --build-and-test
  • More re-usable CI workflows. In principle we could import the workflows in CMake-Template directly pinning it to main, in which the CI maintenance can be offloaded. I can migrate pre-commit, doc-test and build-wheel, more-or-less as they are now, but test would need more work to de-tangle it from the python test matrix

Metadata

Metadata

Assignees

Labels

enhancementSignificant ehancements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions