Migration to cmake