libigl-python-bindings
libigl-python-bindings copied to clipboard
[feature request] pass build options like -j8 as args to setup.py develop
right now, -j2
is hard-coded.
I suggest using CMAKE_BUILD_PARALLEL_LEVEL
or build_ext.parallel
# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
# across all generators.
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
# self.parallel is a Python 3 only way to set parallel jobs by hand
# using -j in the build_ext call, not supported by pip or PyPA-build.
if hasattr(self, "parallel") and self.parallel:
# CMake 3.12+ only.
build_args += ["-j{}".format(self.parallel)]
https://github.com/pybind/cmake_example/blob/ce0ea77878522a85da0be13cf9e425626d05827e/setup.py#L94
#164 introduced this via MAX_JOBS
environment variables (matching pytorch I think). If CMAKE_BUILD_PARALLEL_LEVEL
is more standard then we should use that (please submit a PR if you'd like).