Move CMake build function