title: Howto enable stronger optimization builds
body: <p>I am trying to build PETSc and have problems to enable optimization. Without specifying, PETSc always creates a debugging build, but I can turn that off with passing --with-debugging=0 to cmake. However, this only enables -O1 by default, but as my application is extreme time consuming and very time critical, I want to have at least -O2. I can't find an option except --CFLAGS, which works, but always appends options to the end, so -O1 would override my -O2.</p>
  
  <p>I greped for "-O" to set the flag manually, this gave me a million lines, mostly from the configure.log file and doesn't help.</p>
  
  <p>Does anybody know the file where to set the flag, or a workaround like ...another option that disables the usage of the last specified -O#, but enables the strongest or first?</p>