CheckCXXFeatures

This module checks for several CXX compiler features and introduces a macro to check if given C++ source compiles and links into an executable.

dune_check_cxx_source_compiles
dune_check_cxx_source_compiles(<sources> <var>)

The macro checks that the given sources compiles and links into an executable. Thus, it must at least provide a valid main() function. The macro is inspired by the CMake module command check_cxx_source_compiles() but does not provide all of its functionality. It is also based on the try_compile() command but without any additional flags set, like include directories or link options. The only fixed flag that is passed to try_compile() is CXX_STANDARD with value 17. This can only be influenced by setting the global variable CMAKE_CXX_STANDARD.