CMake SIMD tests may add compiler flags that cause warnings
Currently, it can happen that although CMake configuration passes without any errors or warnings, it picks SIMD compiler flags that cause an excessive number of warnings during compilation. At least the Windows builds on Jenkins are affected: every file produces warnings like
cl : Command line warning D9002 : ignoring unknown option '-msse2'
I haven't checked whether this affects other builds than the Windows ones.
The test still correctly detects when the compiler can't compile the code, and moves on to test the next flag. But in these cases, it fails to detect whether the flag actually makes sense. This is probably because some compilers return a success even though they produced warnings; CheckCCompilerFlag has extra code to work around this, but our custom implementation doesn't have that.
This may not be critical, since the test should still work to find a flag that makes the compilation pass. But the warnings can be confusing for users, and it makes it painful to read the Jenkins console output. Currently, the Jenkins console output is required to diagnose quite a few different types of issues, and it is unnecessarily difficult to find the relevant text when it his hidden in a mass of these warnings.