Fix cmake mode