tools
Tools are all things that can be imported and used in Conan recipes.
Warning
These tools are experimental and subject to breaking changes.
Important
This is the current design for Conan 2.0, and these will be the supported tools. Only the tools documented in this section will be available in Conan 2.0.
Most of the utilities defined in “conan.tools” will require very soon to define both the “host” and “build” profiles. It is very recommended to start defining both profiles immediately to avoid future breaking. Furthermore, some features, like trying to cross-compile might not work at all if the “build” profile is not provided.
The import path is always like:
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
form conan.tools.microsoft import MSBuildToolchain, MSBuildDeps, MSBuild
The main guidelines are:
Everything that recipes can import belong to
from conan.tools
. Any other thing is private implementation and shouldn’t be used in recipes.Only documented, public (not preceded by
_
) tools can be used in recipes.
Contents:
- conan.tools.cmake
- conan.tools.gnu
- conan.tools.google
- conan.tools.apple
- conan.tools.meson
- conan.tools.intel
- conan.tools.microsoft
- conan.tools.qbs
- conan.tools.env
- conan.tools.system.package_manager
- Methods available for system package manager tools
- Configuration properties that affect how system package managers are invoked
- conan.tools.system.package_manager.Apt
- conan.tools.system.package_manager.Yum
- conan.tools.system.package_manager.Dnf
- conan.tools.system.package_manager.PacMan
- conan.tools.system.package_manager.Zypper
- conan.tools.system.package_manager.Brew
- conan.tools.system.package_manager.Pkg
- conan.tools.system.package_manager.PkgUtil
- conan.tools.system.package_manager.Chocolatey
- conan.tools.files
- conan.tools.files.symlinks
- conan.tools.layout