title: Disabling all AVX512 extensions
body: <p>I need to disable all AVX512 extensions in gcc-compiled code. The reason is that Valgrind chokes on AVX512 instructions. Is there a way to do it with a single flag? </p>
  
  <p>I know how to disable each extension individually (<code>-mno-avx512f</code>, <code>-mno-avx512pf</code> etc) but this is troublesome because different gcc versions support different subsets of those. </p>
  
  <p>I use CMake. If there is a way to automate the flags with CMake machinery, this would also work for me.</p>