Use cmake twice to resolve cache