only update compilation database when we need to for standalone cpp