Proper usage of add-all-flags macros
When updating some part of the dune-functions build system the following questions regarding the various add-all-flags approaches came up and I could not find satisfactory answers in the documentation:
target_link_dune_default_libraries()still be used or should it be deprecated in favour of
- Should the
src/example created by
dune_enable_all_packages()is called by default?
- Should the call to
dune_add_test()be replaced by
dune_target_enable_all_packages()such that tests are build similarly to normal executables?
- Should a library module (like, e.g. dune-functions) use
dune_enable_all_packages()? Or is this discouraged, because it has to be used in all derived modules?
- Do we allow building anything without using one of the add-all-flags approaches at all? In view of possible binary incompatibility it looks like "All tests use it" implies "All libraries have to use it" which implies "All applications have to use it"