Skip to content

Draft: Remove cpp definitions resolved in downstream modules

Description

Remove compiler dependent preprocessor definitions from the config files:

  • DUNE_HAVE_CXX_EXPERIMENTAL_IS_DETECTED
  • DUNE_HAVE_CXX_STD_IDENTITY
  • DUNE_HAVE_CXX_UNEVALUATED_CONTEXT_LAMBDA

This MR removes the CMake compiler/library tests for these definitions and provides Dune::Std::is_detected and Dune::Std::identity unconditionally. That is, independent of the compiler used in the downstream project, these two utilities will always be available. The DUNE_HAVE_CXX_UNEVALUATED_CONTEXT_LAMBDA is completely removed since is not used in dune-common at all.

Motivation

The motivation of this change is to remove the dependency of config file between modules. Before this change, these cpp definitions where resolved in the downstream module. With this change, the config file is fully resolvable locally in dune-common and we can transition to a non dune specific build system in the spirit of #234 (closed).

See discussion here: #234 (comment 128723)

Note that if this is merged, we need to adapt <dune/grid/concepts.hh> to have another way to know if DUNE_HAVE_CXX_UNEVALUATED_CONTEXT_LAMBDA is true (i.e., gcc>=9 or clang>=12)

Edited by Santiago Ospina De Los Ríos

Merge request reports

Loading