Use export CXXFLAGS=-O2 to speedup cmake