cmake¶
Utilities for invoking CMake
See the source code on Github: yzlite/utils/cmake.py
Functions
|
Build an YZLITE CMake target |
|
|
|
Invoke an YZLITE CMake target |
|
Convert a list or dictionary of CMake variables into a dictionary |
- build_yzlite_target(target=None, yzlite_target=None, additional_variables=None, debug=False, clean=False, source_dir=None, build_dir=None, build_subdir=None, platform=None, logger=None, verbose=False, jobs=None, accelerator=None, use_user_options=False, config_only=False, build_only=False)[source]¶
Build an YZLITE CMake target
- Parameters:
target (
Optional[str]) – Name of CMake target to buildyzlite_target (
Optional[str]) – Name of YZLITE_TARGET, if omitted use targetadditional_variables (
Union[List[str],Dict[str,str],None]) – List or dictionary of additional CMake variables to add to the build commanddebug (
bool) – If true then build with debugging (i.e. full symbols and no optimization)clean (
bool) – Clean the build directory before buildingsource_dir (
Optional[str]) – Path to source directory, if omitted use yzlite root directorybuild_dir (
Optional[str]) – Path to build directory, if omitted use <temp dir>/yzlite/buildbuild_subdir (
Optional[str]) – Name of sub build directory, if omitted use target nameplatform (
Optional[str]) – Build platform, if omitted use current OSlogger (
Optional[Logger]) – Optional python loggerverbose (
bool) – Enable verbose logging while buildingaccelerator (
Optional[str]) – Name of accelerator to use for TFLITE_MICRO_ACCELERATOR CMake variablejobs (
Optional[int]) – Number of parallel build jobsuse_user_options (
bool) – Use the user_options.cmake in the source directory. Default is to IGNORE user_options.cmakeconfig_only (
bool) – Only configure the CMake project, do not build itbuild_only (
bool) – Only build the target, do not configure it first. In this case, the project must have been previosly configured
- Return type:
str- Returns:
The path to the build directory
- invoke_yzlite_target(target, build_target=None, debug=False, build_dir=None, build_subdir=None, platform=None, logger=None, verbose=False)[source]¶
Invoke an YZLITE CMake target
- Return type:
str- Parameters:
target (str) –
build_target (Optional[str]) –
debug (bool) –
build_dir (Optional[str]) –
build_subdir (Optional[str]) –
platform (Optional[str]) –
logger (Optional[Logger]) –
verbose (bool) –