Remove ENABLE_UG Flag from config.h file and source files
Summary
dune-uggrid is an optional dependency. Thus dune-grid can be compiled with and without uggrid, e.g., by setting CMAKE_DISABLE_FIND_PACKAGE_dune-uggrid=1 or by simply not providing the dune module.
But, additionally, uggrid can be deactivated by setting the ENABLE_UG compiler option, e.g., by -DENABLE_UG=0.
This does not work! If UG is found, it must be compiled with ENABLE_UG=1. Thus, this option has no actual meaning.
In dune/grid/uggrid/CMakeLists.txt we have the lines:
if(dune-uggrid_FOUND)
dune_add_library("uggrid" OBJECT SOURCES uggridintersections.cc uggrid.cc...)
endif()
This means: the dune-grid part of uggrid is always compiled if dune-uggrid is found.
By providing the option ENABLE_UG as compile option, it indicates that ug can be deactivated later that is not the case. I suggest, to remove this option completely.
Note: This needs a follow-up merge request in dune-uggrid