Adding cmake mode - Fix#2.