fixed cmake scripts to support removal of 2d memory model