Optimize setup process when building from source