Register `UG_USE_NEW_DIMENSION_DEFINES` in the dune target definitions
The line that defines the UG_USE_NEW_DIMENSION_DEFINES
is set globally over the CMake folder that calls the macro. If the macro is loaded in a sub-directory, the flag won't be available for targets used in parent directories. See copasi/dune-copasi#68 (closed) for more details.
I think that the easiest way to get rid of this corner case is to declare the definition in the UG_DEFINITIONS
variable, which is later registered into the dune definitions for UGGrid.