You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: empty build arguments in multi-target build (#784)
This commit fixes an issue when building a package with multiple
targets.
**[Bug]** To give an example:
```toml
cmake.targets = ["target_A", "target_B", "target_C"]
```
In this case, scikit-build-core generates a sequence of build commands:
```bash
cmake --target target_A --config Release
cmake --target target_B
cmake --target target_C
```
Note that `--config Release` is lost since the second target.
**[Cause]** This originates from the case where `local_args` in
`CMaker.build` in `cmake.py` is a generator rather than a list/tuple,
and it becomes empty after being passed to `self._build` in [line
247](https://github.com/scikit-build/scikit-build-core/blob/83afeb2cad1f9f0168d92df6b9b0f9d43abd53a4/src/scikit_build_core/cmake.py#L247).
**[Fix]** This PR proactively converts `local_args` to a Python list
before feeding it to `self._build`.
0 commit comments