[gmx-developers] GROMACS modularization improvements: CMake targets
Mark Abraham
mark.j.abraham at gmail.com
Fri Nov 13 09:00:17 CET 2020
Hi devs!
Some module reorganization is in order so we can do a better job of a few
things:
* expressing the differences between installed, module-interface, and
module-internal headers through filesystem location
* using per-module CMake targets for better control of things like
compilation flags
* avoiding test binaries depending on all of libgromacs
* fewer custom CMake functions for managing all the above
Please consider whether you can contribute to the effort, and fill out the
poll at https://doodle.com/poll/56b26yepmxrhe6ny
The goal for the day is to remove `src/` from all INCLUDE_DIRS by
reorganizing the module-interface headers and CMakeLists.txt files for all
modules.
Moving forward, in order for `moduleB` sources to `#include
"gromacs/moduleA/header.h", the CMakeLists.txt for `moduleB` will need a
`target_link_libraries(moduleB PRIVATE moduleA)` (or
`target_link_libraries(moduleB PUBLIC moduleA)`, if `moduleB` needs to
convey transitive dependency on `moduleA` to moduleC that depends on
moduleB.
Some preliminary discussion can be found at
https://gitlab.com/gromacs/gromacs/-/issues/3288 and we have a working
document at
https://docs.google.com/document/d/1L5Ur8HybxqfglKLdaKgYrc1_RMPFtNAM0qpnijUHsb0/edit?usp=sharing
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20201113/96733464/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list