ADTF Conan Generator
Loading...
Searching...
No Matches
Guide

Description

This guide contains an overview about available settings for the generated files and scripts that can be configured in the conanfile.py of the package.
For examples on how to use the information listed here, please have a look at the examples located in Examples.

List of generated files and scripts

The following table gives an overview about the generated files which are created by the ADTF Conan Generator:

File Description
<name_of_project_dir>.adtfenvironment Dynamic generated .adtfenvironment file containing paths collected for the system the generator has been executed on.
start_configuration_editor[.bat|.sh] Starts the ADTF Configuration Editor with the .adtfenvironment file.
<launcher from environment><project_name>[.bat|.sh] The generator creates a permutation of all launch entries found in the environment files and all sessions from the project file, unless a sessions_allowlist or tools_allowlist is applied.
activate[.bat|.ps1|.sh] Activates virtual conan environment.
deactivate[.bat|.ps1|.sh] Deactivates virtual conan environment.
environment[.bat|.ps1|.sh] Specifies conan environment variables.

Preparing the Conanfile

The generator can be configured within the conanfile of the project that uses the adtf_conan_generator. The following sections show the possibilites how to do this:

Dictionary

The main configuration of the ADTF Conan Generator can be done via key-value entries in the adtf_generator dictionary within the conanfile.py. The following table lists all possible entries which are evaluated during file and script generation:

Entry Relates to Description
name All Files Base name for the .adtfenvironment file and scripts. Defaults to the Conan package name.
base_path Projects / Scripts Root directory of your ADTF project. Defaults to conanfile.source_folder.
environment .adtfenvironment Nested configuration block containing the keys below:
  └ version .adtfenvironment Sets the product version.
  └ description .adtfenvironment Sets the environment description.
  └ environment_directory_macro .adtfenvironment Macro name for the package root. Defaults to GENERATOR_DIR.
  └ macros .adtfenvironment Dictionary of key-value pairs to be defined as environment macros.
  └ projects .adtfenvironment A list of .adtfproject files (relative to base_path) to be included and parsed.
  └ tools .adtfenvironment A list of tool definitions to be added to the .adtfenvironment file.
  └ documentation .adtfenvironment Relative path to documentation within the package.
  └ plugin_directories .adtfenvironment List of relative paths to search for .adtfplugin files.
  └ additional .adtfenvironment List of additional .adtfenvironment files to include.

Optional attributes

The following attributes allow the generator to have specific behaviour if the attribute is set to True. If the attributes are not present in the conanfile it is equivalent as setting them to False.

Name type description
sessions_allowlist list A list of session names to include. If defined, start scripts will only be generated for sessions in this list.
tools_allowlist list A list of tool names to include. If defined, start scripts will only be generated for "launch" type tools in this list.
ce_settings CE Config Dictionary to override settings in the generated adtf_configuration_editor.cesettings.
sessions_start_scripts Deprecated Dictionary of custom commands to wrap into scripts (e.g., {"ToolName": {"command": "..."}}).
projects Deprecated A list of .adtfproject files (relative to base_path) to be included and parsed.
sessions Deprecated Additional .adtfsession files (relative to base_path) for which start scripts should be generated.