sync to safemode branch -r12732, need to use cmake for now for the smp speedup, and you will love the results when you do
Authored by: safemode 2010-03-17
Parent: [r12732]
Child: [r12734]