Editable layout files

This file contain information consumed by editable packages. It is an .ini file listing the directories that Conan should use for the packages that are opened in editable mode. Before parsing this file Conan runs Jinja2 template engine with the settings, options and reference objects, so you can add any logic to this files:

# Affects to all packages but cool/version@user/dev

# using placeholders from conan settings and options

{% if options.shared %}
{% else %}
{% endif %}

# Affects only to cool/version@user/dev

# The source_folder, build_folder are useful for workspaces


The specific sections using a package reference will have higher priority than the general ones.

This file can live in the conan cache, in the .conan/layouts folder, or in a user folder, like inside the source repo.

If there exists a .conan/layouts/default layout file in the cache and no layout file is specified in the conan editable add <path> <reference> command, that file will be used.

The [source_folder] and [build_folder] are useful for workspaces. For example, when using cmake workspace-generator, it will locate the CMakeLists.txt of each package in editable mode in the [source_folder] and it will use the [build_folder] as the base folder for the build temporary files.

It is possible to define out-of-source builds for workspaces, using relative paths and the reference argument. The following could be used to locate the build artifacts of an editable package in a sibling build/<package-name> folder:




See also

Check the section Packages in editable mode and Workspaces to learn more about this file.