qiBuild documentation

qibuild.build_config

CMakeBuildConfig

class qibuild.build_config.CMakeBuildConfig(build_worktree)

Compute a list of CMake flags from all the settings that can affect the build (the toolchain name, the build profiles, etc ...)

profiles

A list of build profiles to use (coming from qibuild configure -p<profile>), or read form the local settings

user_flags

Additional list of CMake flags (coming from qibuild configure -D<flags>) Should be a list of tuples (<key>, <value>)

local_cmake

Path to the “custom” CMake file. Its content will be added to the generated CMake files when running qibuild configure

Returns:None if the custom CMake file does not exist
toolchain

The current toolchain, either set by the user from the command line or read from the local qibuild settings

debug

Whether we are building in debug. True unless user specified –release

using_make

Whether we are using make

using_visual_studio

Whether we are using visual studio

cmake_generator

The current CMake generator, either set by the user from the command line or read from the qibuild configuration files

build_env

A dictionary defining the environment used when building, as read from qibuild configuration files. os.environ will remain unchanged

build_directory(prefix='build', name=None, system=False)

Return a suitable build directory, making sure there is one build directory per config name.

If name is None, read the active build config (set by the user with -c, or read as the default config for the worktree0

If system is True, returns sys-<system>-<arch>

cmake_args

The CMake arguments to use

default_config

The default configuration, as read from the local build settings

read_local_settings()

Read <worktree>/.qi/qibuild.xml

set_active_config(config_name)

Set the active configuration. This should match an existing config name

Used when running qibuild configure -c <config>