rewrite make all script to cmake