How to handle building examples?
In dune-common, dune-grid-howto, and dune-functions we have example applications, that are examples. They are neither the library nor tests. How should we handle building examples?
- We can build them anyway. Thus wasting CPU cycles and user's time to just build useless examples over and over again. (status quo for dune-common)
- Don't automatically built the examples. This is prone to bit rotting examples, thus not optimal.
- We can create a target
examples
which builds all examples.
b) We could make andune_example
macro which would create an executable, which would be built for targetexample
and which would be added as a compile-only test. This would prevent bit-rotting
What do you think?