bundle.pybind.services.cmake¶
Classes¶
A utility class for running CMake commands. |
Module Contents¶
- class bundle.pybind.services.cmake.CMakeService[source]¶
A utility class for running CMake commands.
- class BuildType(*args, **kwds)[source]¶
Bases:
enum.EnumEnum-like class for CMake build types.
- DEBUG = 'Debug'¶
- RELEASE = 'Release'¶
- RELWITHDEBINFO = 'RelWithDebInfo'¶
- MINSIZEREL = 'MinSizeRel'¶
- static configure(source_dir: pathlib.Path, build_dir_name: str, install_prefix: pathlib.Path | None = None, build_type: BuildType = BuildType.RELEASE, extra_args: list[str] | None = None) None[source]¶
- Async:
Configures a CMake project.
- Parameters:
source_dir – The root directory of the source code (contains CMakeLists.txt).
build_dir_name – The name of the build directory, relative to source_dir.
install_prefix – Optional path for CMAKE_INSTALL_PREFIX.
extra_args – Optional list of extra arguments to pass to cmake.
- static build(source_dir: pathlib.Path, build_dir_name: str, target: str | None = None, build_type: BuildType = BuildType.RELEASE, extra_args: list[str] | None = None) None[source]¶
- Async:
Builds a CMake project.
- Parameters:
source_dir – The root directory of the source code (used as CWD for the command).
build_dir_name – The name of the build directory, relative to source_dir.
target – Optional build target (e.g., “install”).
extra_args – Optional list of extra arguments to pass to cmake –build.