Rearrange CMake commands