Checks for unsupported and invalid compilers happen too late
Summary
A CPU hardware benchmarking effort within Intel was still using GROMACS 2021.4 and icc 2021.6 (perhaps because Intel deprecated icc around then and we removed support for it immediately after in 18f24fcf). When I asked them to update to GROMACS 2024.1, they continued using icc
and ran into issues finding libstdc++
before hitting our CMake code (introduced in that commit) that prompts people to avoid using icc
. We should provide that prompt earlier. This will also avoid other people using unsupported compilers wasting time resolving issues before being informed that their compiler will never work.
Exact steps to reproduce
Try to build GROMACS 2021.4 with oneAPI 2021.1
For developers: Why is this important?
Users wasting time is not nice.
If this is a bug, (1) what happens, and (2) what did you expect to happen?
CMake can stop when it is unable to find std::filesystem
when we actually want it to tell the user to stop using icc
.
Relevant input files, logs and/or screenshots
N/A
Possible fixes
Reorder the CMake so we warn about compilers before we search for c++17 support