move cmake script source files into c++ source