BUILD_SHARED_LIBS=ON is set per default in the build system. So with -static-libs a shared library will be built.

I thought about having a behaviour similar to lapack-reference or blas-reference, where building with +static-libs will produce only an archive (without the shared library). Unfortunately, a simultaneous build of shared library and archive is not supported by the build system. (Or not easily supported by CMake at all...)

Regarding DEAL_II_PREFER_STATIC_LIBS: This toggle will prefer to resolve external dependencies with static libraries. This is useful if both, static and shared libraries, are in place. Otherwise cmake prefers to find shared libraries. The idea behind this is that, if +static-libs is specified, a link interface that is as static as possible is intended.

Or is this a bad idea? (deal.II does export a project and target configuration so that the user has a chance to know the complete link interface - either with his own cmake project, or by manually parsing a deal.IIConfig.cmake file.)