Error with pre-14 C++ standard is misleading, claiming that compiler is too old when it is not
When the build uses pre-14 C++ standard, Eigen spits out an error, which is misleading:
:info:build [ 8%] Building CXX object src/CMakeFiles/openbabel.dir/builder.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/build/src && /opt/local/bin/g++-mp-13 -DHAVE_EIGEN -DHAVE_EIGEN3 -DHAVE_LIBZ -DHAVE_RADPIJSON -DHAVE_SHARED_POINTER -DHAVE_WXWIDGETS -DMAKE_OBDLL -DUSING_DYNAMIC_LIBS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXMAC__ -I/opt/local/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/build/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/openbabel-3.1.1/data -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/openbabel-3.1.1/include -I/opt/local/include/eigen3 -isystem /usr/lib/wx/include/mac-unicode-debug-2.8 -isystem /usr/include/wx-2.8 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=gnu++11 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT src/CMakeFiles/openbabel.dir/builder.cpp.o -MF CMakeFiles/openbabel.dir/builder.cpp.o.d -o CMakeFiles/openbabel.dir/builder.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/openbabel-3.1.1/src/builder.cpp
:info:build In file included from /opt/local/include/eigen3/Eigen/Core:19,
:info:build from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/openbabel-3.1.1/include/openbabel/distgeom.h:34,
:info:build from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_science_openbabel/openbabel/work/openbabel-3.1.1/src/builder.cpp:33:
:info:build /opt/local/include/eigen3/Eigen/src/Core/util/Macros.h:712:2: error: #error This compiler appears to be too old to be supported by Eigen
:info:build 712 | #error This compiler appears to be too old to be supported by Eigen
:info:build | ^~~~~
The problem is not that compiler is old – it is not at all, but that CMakeLists – or build system, in general case, have set a wrong C++ standard.