6.1.2.13. MesonIntegration¶
Use Meson for analysis compilation
This rule calls Meson with the specified options.
Alternatively, you can use the
CompileCommandsIntegration rule as a
subsequent build step when using the generated compile_commands.json and
disabling execute_build.
At least one of execute_setup or execute_build have to be set to true.
Options¶
The following places define options that affect this rule: BuildSystemIntegration, Project-GlobalOptions
abort_on_error¶
abort_on_error : bool = True
backend¶
backend : Backend | str = 'ninja'
Meson build system backend to use (Meson option --backend).
When selecting predefined backend ninja, then set building with
execute_build set to true is supported.
For Visual Studio backends you need to disable
execute_build and use a subsequent
MSBuildIntegration build step with the main
.vcxproj and/or .sln file configured.
build_directory¶
build_directory : bauhaus.analysis.config.ProjectRelativePath = 'build'
build_environment¶
build_environment
Type: dict[str, str]
Default:
{ 'COMPILE_ONLYIR': '1' }
Environment for the call to Meson for building the project. These entries will be added to the ones in environment and take priority if the same keys are set.
Only relevant at all, if execute_build is set to true.
build_options¶
build_options : str | None = None
Additional command-line parameters for the call to Meson for building the project. These options will be added to the ones in options later on the command-line.
Only relevant at all, if execute_build is set to true.
capture_output¶
capture_output : bool = False
The output will be parsed according to the format configured with the options output_format, stdout_format, stderr_format.
environment¶
environment : dict[str, str] = {}
Environment for all calls to Meson. These entries are added to the environment and existing ones will be overwritten.
E.g.:
CCACHE_DISABLE=1(to disable CCache)
execute_build¶
execute_build : bool = True
If set, also start the build using meson compile
(which may or may not work that way). Otherwise you need to add another
build step to call a correctly configured build tool after Meson setup.
execute_setup¶
execute_setup : bool = True
If set, runs the setup phase with the configured options.
This option should be left enabled for almost all cases, except if you only want to execute the build in an already configured build_directory.
options¶
options : str | None = None
output_format¶
output_format : list[str] = ['generic']
The format names available here correspond to the provider
options in /Analysis/AnalysisControl/ExternalAnalysisFormats.
This option only has an effect if capture_output is true.
setup_environment¶
setup_environment
Type: dict[str, str]
Default:
{ 'AR': 'irAR', 'AS': 'irCC', 'BAUHAUS_IR_COMPRESSION': 'none', 'CC': 'irCC', 'COMPILE_ONLY': '1', 'CXX': 'irCXX', 'OBJCOPY': 'irOBJCOPY', 'OBJDUMP': 'irOBJDUMP', 'SIZE': 'irSIZE', 'STRIP': 'irSTRIP' }
Environment for the call to Meson for setup of the project build system. These entries will be added to the ones in environment and take priority if the same keys are set.
setup_options¶
setup_options : str | None = None
Additional command-line parameters for the call to Meson for setup of the project build system. These options will be added to the ones in options later on the command-line.
setup_variables¶
setup_variables : dict[str, str] = {}
Meson variables to configure.
Those variables will be converted to -DKEY=VALUE switches and
precede options on the command-line.
source_directory¶
source_directory : bauhaus.analysis.config.ProjectRelativePath | None = None
stderr_format¶
stderr_format : list[str] = []
The format names available here correspond to the provider
options in /Analysis/AnalysisControl/ExternalAnalysisFormats.
This option only has an effect if capture_output is true.
stdout_format¶
stdout_format : list[str] = []
The format names available here correspond to the provider
options in /Analysis/AnalysisControl/ExternalAnalysisFormats.
This option only has an effect if capture_output is true.
toolname¶
toolname : bauhaus.analysis.config.PlainPath = 'meson'
Option Types¶
These types are used by options listed above:
Backend¶
An enumeration.ninja
Generates build.ninja files.vs2015
Generates Visual Studio 2015 project files.vs2017
Generates Visual Studio 2017 project files.vs2019
Generates Visual Studio 2019 project files.vs2022
Generates Visual Studio 2022 project files.