Add gnm support option to cmake