Skip to content

Commit f2a0c9a

Browse files
committed
Use cmake --build instead of make -C
On my system, Ubuntu 24.04 image with CMake 3.28.3, the cmake config defaults to the ninja generator, leading to an error in `pip install -e .` because no `Makefile` is generated. Instead, we can use cmake to do the build as well using `cmake --build <build_dir>` which will call whatever tool matches the default generator.
1 parent 398bd57 commit f2a0c9a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _make(self, build_dir: str, build_type: str, parallel: int):
3434
f"/p:Configuration={build_type}",
3535
"/t:_cext"])
3636
else:
37-
self.spawn(["make", "-C", build_dir, "-j", str(parallel)])
37+
self.spawn(["cmake", "--build", build_dir, "-j", str(parallel)])
3838
# TODO: ideally, we should "make install" the library somewhere, so that CMake removes
3939
# any build RPATHs etc. But I'll leave that for another day.
4040

0 commit comments

Comments
 (0)