Be more explicit about build-tree-only dependencies.
authorM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 13 Nov 2020 11:37:55 +0000 (14:37 +0300)
committerM. Eric Irrgang <ericirrgang@gmail.com>
Fri, 13 Nov 2020 11:37:55 +0000 (14:37 +0300)
commitf310554adcb5f5be74de7bf6fa7c26a4bd1a9ee5
treebd3ed4a1e87964e04ad8ce6d691471f7b7740198
parent312e89c3c81f60aa576c64d098cd2c26f417d3d1
Be more explicit about build-tree-only dependencies.

Use the BUILD_INTERFACE CMake generator expression to improve
self-documentation and to prevent build-tree-only dependencies from
propagating to exported targets. When libgromacs is a STATIC target,
even private dependencies can affect the exported target through
transitive usage requirements (e.g. compiler/linker flags). However,
we currently only use the `common` and `legacy_modules` targets for
build time header paths.

Ref #3288
src/gromacs/CMakeLists.txt