Compiling box2d with optimisations.

I followed the (old) instructinos in Building.txt included with 2.2.1 using cmake.

But I can't as of yet find any information on compiling with optimisations.

If the default is 'not' a debug compile, then I must be doing something very wrong, or box2d is a lot slower than I had imagined (In fact, I have a faster equivalent demo running in flash than c++ which is why I think the compiled box2d must not have any optimisations from compiler activated)
Seems my major issue was a misunderstanding that SetAsBox(w,h) takes half-width/heights. after dividing the inputs by 2 everything is fine (Up till now I had no graphical view of what was going on in the simulation).

The fps is still not what I expected however.

With a pyramid of 820 blocks i'm getting about 20-30fps which seems too small as I'm able to get 90fps with my own engine in haxe being compiled into c++, which gives 30-40fps in flash player (with overheads in translation to c++) with same parameters regarding iterations and simulation quality. I expected box2d to be faster being native c++
CMAKE_BUILD_TYPE=Release

more expected performance now! 180fps, not 30fps 😛

Original thread: https://box2d.org/forum/viewtopic.php?t=8251