The typical location of the conan.conf file is the directory
[log] run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT run_to_file = False # environment CONAN_LOG_RUN_TO_FILE level = critical # environment CONAN_LOGGING_LEVEL # trace_file = # environment CONAN_TRACE_FILE print_run_commands = False # environment CONAN_PRINT_RUN_COMMANDS [general] default_profile = default compression_level = 9 # environment CONAN_COMPRESSION_LEVEL sysrequires_sudo = True # environment CONAN_SYSREQUIRES_SUDO request_timeout = 60 # environment CONAN_REQUEST_TIMEOUT (seconds) default_package_id_mode = semver_direct_mode # environment CONAN_DEFAULT_PACKAGE_ID_MODE # parallel_download = 8 # experimental download binaries in parallel # full_transitive_package_id = 0 # retry = 2 # environment CONAN_RETRY # retry_wait = 5 # environment CONAN_RETRY_WAIT (seconds) # sysrequires_mode = enabled # environment CONAN_SYSREQUIRES_MODE (allowed modes enabled/verify/disabled) # vs_installation_preference = Enterprise, Professional, Community, BuildTools # environment CONAN_VS_INSTALLATION_PREFERENCE # verbose_traceback = False # environment CONAN_VERBOSE_TRACEBACK # error_on_override = False # environment CONAN_ERROR_ON_OVERRIDE # bash_path = "" # environment CONAN_BASH_PATH (only windows) # read_only_cache = True # environment CONAN_READ_ONLY_CACHE # cache_no_locks = True # environment CONAN_CACHE_NO_LOCKS # user_home_short = your_path # environment CONAN_USER_HOME_SHORT # use_always_short_paths = False # environment CONAN_USE_ALWAYS_SHORT_PATHS # skip_vs_projects_upgrade = False # environment CONAN_SKIP_VS_PROJECTS_UPGRADE # non_interactive = False # environment CONAN_NON_INTERACTIVE # skip_broken_symlinks_check = False # enviornment CONAN_SKIP_BROKEN_SYMLINKS_CHECK # revisions_enabled = False # environment CONAN_REVISIONS_ENABLED # conan_make_program = make # environment CONAN_MAKE_PROGRAM (overrides the make program used in AutoToolsBuildEnvironment.make) # conan_cmake_program = cmake # environment CONAN_CMAKE_PROGRAM (overrides the make program used in CMake.cmake_program) # cmake_generator # environment CONAN_CMAKE_GENERATOR # cmake_generator_platform # environment CONAN_CMAKE_GENERATOR_PLATFORM # http://www.vtk.org/Wiki/CMake_Cross_Compiling # cmake_toolchain_file # environment CONAN_CMAKE_TOOLCHAIN_FILE # cmake_system_name # environment CONAN_CMAKE_SYSTEM_NAME # cmake_system_version # environment CONAN_CMAKE_SYSTEM_VERSION # cmake_system_processor # environment CONAN_CMAKE_SYSTEM_PROCESSOR # cmake_find_root_path # environment CONAN_CMAKE_FIND_ROOT_PATH # cmake_find_root_path_mode_program # environment CONAN_CMAKE_FIND_ROOT_PATH_MODE_PROGRAM # cmake_find_root_path_mode_library # environment CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY # cmake_find_root_path_mode_include # environment CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE # msbuild_verbosity = minimal # environment CONAN_MSBUILD_VERBOSITY # cpu_count = 1 # environment CONAN_CPU_COUNT # Change the default location for building test packages to a temporary folder # which is deleted after the test. # temp_test_folder = True # environment CONAN_TEMP_TEST_FOLDER # cacert_path # environment CONAN_CACERT_PATH # scm_to_conandata # environment CONAN_SCM_TO_CONANDATA # config_install_interval = 1h # required_conan_version = >=1.26 # keep_python_files = False # environment CONAN_KEEP_PYTHON_FILES [storage] # This is the default path, but you can write your own. It must be an absolute path or a # path beginning with "~" (if the environment var CONAN_USER_HOME is specified, this directory, even # with "~/", will be relative to the conan user home, not to the system user home) path = ./data # download_cache = /path/to/my/cache [proxies] # Empty (or missing) section will try to use system proxies. # As documented in https://requests.readthedocs.io/en/master/user/advanced/#proxies - but see below # for proxies to specific hosts # http = http://user:email@example.com:3128/ # http = http://10.10.1.10:3128 # https = http://10.10.1.10:1080 # To specify a proxy for a specific host or hosts, use multiple lines each specifying host = proxy-spec # http = # hostname.to.be.proxied.com = http://user:firstname.lastname@example.org:3128 # You can skip the proxy for the matching (fnmatch) urls (comma-separated) # no_proxy_match = *center.conan.io*, https://myserver.* [hooks] # environment CONAN_HOOKS attribute_checker # Default settings now declared in the default profile
level variable, defaulted to 50 (critical events), declares the LOG level .
If you want to show more detailed logging information, set this variable to lower values,
as 10 to show debug information, or use the level names as
debug. You can also adjust the environment variable
The level number is related to the Python Logging Levels.
print_run_commands, when is 1, Conan will print the executed commands in
self.run to the output.
You can also adjust the environment variable CONAN_PRINT_RUN_COMMANDS
run_to_file variable, defaulted to False, will print the output from the
executions to the path that the variable specifies.
You can also adjust the environment variable
run_to_output variable, defaulted to 1, will print to the
stdout the output from the
self.run executions in the conanfile. You can also adjust the environment variable
trace_file variable enable extra logging information about your conan command executions.
Set it with an absolute path to a file.
You can also adjust the environment variable
vs_installation_preference variable determines the preference of usage when searching a Visual installation. The order of preference
by default is Enterprise, Professional, Community and BuildTools. It can be fixed to just one type of installation like only BuildTools. You
can also adjust the environment variable
verbose_traceback variable will print the complete traceback when an error occurs in a recipe or even in the conan code base, allowing
to debug the detected error.
error_on_override turn the messages related to dependencies overriding into errors. When a downstream
package overrides some dependency upstream, if this variable is
True then an error will be raised; to bypass
these errors those requirements should be declared explicitly with the
bash_path variable is used only in windows to help the
tools.run_in_windows_bash() function to locate our Cygwin/MSYS2 bash.
Set it with the bash executable path if it’s not in the PATH or you want to use a different one.
cache_no_locks variable is used to disable locking mechanism of local cache.
This is primary used for debugging purposes, and in general it’s not recommended to disable locks otherwise,
as it may result in corrupted packages.
default_package_id_mode changes the way package IDs are computed. By default, if not specified
it will be
semver_direct_mode, but can change to any value defined in Using package_id() for Package Dependencies.
full_transitive_package_id changes the way package IDs are computed regarding transitive dependencies.
By default, if not specified will be disabled (
0). Read more about it in Enabling full transitivity in package_id modes.
parallel_download configuration defines the number of threads to be used to do parallel downloads of
different binaries. This happens when dependencies are installed (
conan create) and when
multiple binaries for the same package are retrieved via
conan download command. This is an experimental
feature, subject to change. It is known that the output is still not clean, and will be mangled when using multiple
threads. Please report on https://github.com/conan-io/conan/issues about performance gains, and other issues.
You might want to try this one in combination with the
storage.download_cache configuration (see below.)
revisions_enabled variable controls the package revisioning feature. See Package Revisions for more info`
cmake_*** variables will declare the corresponding CMake variable when you use the
cmake generator and the CMake build tool.
msbuild_verbosity variable is used only by MSBuild and CMake build helpers.
For the CMake build helper, it has an effect only for
`Visual Studio` generators.
Variable defines verbosity level used by the
`msbuild` tool, as documented on MSDN <https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2017>.
`minimal verbosity level is used, matching the Visual Studio IDE behavior.
Allowed values are (in ascending order):
You can also adjust the environment variable
conan_make_program variable used by CMake and AutotoolsBuildEnvironment build helpers.
It overrides a default
`make` executable, might be useful in case you need to use a different make (e.g. BSD Make instead of GNU Make, or MinGW Make).
Set it with the make executable path if it’s not in the PATH or you want to use a different one.
conan_cmake_program variable used only by CMake build helper.
It overrides a default
`cmake` executable, might be useful in case you need to use a CMake wrapper tool (such as scan build).
Set it with the cmake executable path if it’s not in the PATH or you want to use a different one.
cpu_count variable set the number of cores that the tools.cpu_count() will return,
by default the number of cores available in your machine.
Conan recipes can use the
cpu_count() tool to build the library using more than one core.
retry variable allows to set up the global default value for the number of retries in all commands related to
download/upload. User can override the value provided by the variable if the command provides an argument with the same name.
retry_wait variable allows to set up the global default value for the time (in seconds) to wait until the next retry
on failures in all commands related to download/upload. User can override the value provided by the variable if the command provides
an argument with the same name.
sysrequires_mode variable, defaulted to
enabled (allowed modes
controls whether system packages should be installed into the system via
typically used in system_requirements().
You can also adjust the environment variable
sysrequires_sudo variable, defaulted to True, controls whether
sudo is used for installing apt, yum, etc.
system packages via
SystemPackageTool. You can also adjust the environment variable
request_timeout variable, defaulted to 30 seconds, controls the time after Conan will stop waiting for a response.
Timeout is not a time limit on the entire response download; rather, an exception is raised if the server has not issued a
response for timeout seconds (more precisely, if no bytes have been received on the underlying socket for timeout seconds).
If no timeout is specified explicitly, it do not timeout.
user_home_short specify the base folder to be used with the short paths feature.
If not specified, the packages marked as short_paths will be stored in the
C:\.conan (or the current drive letter).
If the variable is set to “None” will disable the short_paths feature in Windows, for modern Windows that enable long paths at the system level.
Setting this variable equal to, or to a subdirectory of, the local conan cache (e.g. ~/.conan) would result in an invalid cache configuration and is therefore disallowed.
verbose_traceback variable will print the complete traceback when an error occurs in a recipe or even
in the conan code base, allowing to debug the detected error.
cacert_path variable lets the user specify a custom path to the cacert.pem file to use
in requests. You can also adjust this value using the environment variable
client_cert_key_path variables let the user specify a custom path to the client.crt / client.key files.
scm_to_conandata variable tells Conan to store the resolved information of the SCM feature in the
conandata.yml file instead of modifying the recipe file itself. You can also adjust
this value using the environment variable
skip_broken_symlinks_check variable (defaulted to
False) allows the existence broken symlinks while creating a package.
config_install_interval variable starts a time scheduler which runs conan config install according the time interval
configured. It only accepts the follow time intervals: seconds, minutes, hours, days and weeks (e.g 10s, 35m, 48h, 1d, 2w). Empty units or not listed units are not valid, they are considered an error and will be removed automatically on the next execution.
required_conan_version variable validates if the current Conan client version is valid according to its version. When it’s not
according to the required version or its range, Conan raises an exception before running any command. It accepts SemVer format, including version range.
This configuration is useful when a company wants to align the Conan client version used by all teams. This can be also specified at
recipe level if you need adding this information just for certain recipes.
keep_python_files variable will allow Python .pyc files to be packaged. If set to
.pyc files will be added to the Conan package, otherwise they will be filtered.
storage.path variable define the path where all the packages will be stored. By default it is ./data, which
is relative to the folder containing this conan.conf file, which by default is the <userhome>/.conan folder.
It can start with “~”, and that will be expanded to the current user home folder. If the environment var CONAN_USER_HOME is specified,
the “~” will be replaced by the current Conan home (the folder pointed by the CONAN_USER_HOME environment variable).
- It is recommended to assign it to some unit, e.g. map it to X: in order to avoid hitting the 260 chars path name length limit).
- Also see the short_paths docs to know more about how to mitigate the limitation of 260 chars path name length limit.
- It is recommended to disable the Windows indexer or exclude the storage path to avoid problems (busy resources).
If you want to change the default “conan home” (directory where
conan.conf file is) you can adjust
the environment variable
storage.download_cache variable defines the path to a folder that can be used to cache the different file downloads from Conan servers but
also from user downloads via the
tools.download() methods that provide a checksum. Defining this variable will both configure
the path and activate the download cache. If it is not defined, the download cache will not be used.
Read more about the download cache here.
no_proxy is deprecated in favor of
no_proxy_match since Conan 1.16.
If you leave the
[proxies] section blank or delete the section, conan will copy the system
configured proxies, but if you configured some exclusion rule it won’t work:
[proxies] # Empty (or missing) section will try to use system proxies.
You can specify http and https proxies as follows. Use the no_proxy_match keyword to specify a list of URLs or patterns that will skip the proxy:
[proxies] # As documented in https://requests.readthedocs.io/en/master/user/advanced/#proxies http: http://user:email@example.com:3128/ http: http://10.10.1.10:3128 https: http://10.10.1.10:1080 http: http://10.10.2.10 hostname1.to.be.proxied.com = http://user:firstname.lastname@example.org hostname2.to.be.proxied.com = http://user:email@example.com no_proxy_match: http://url1, http://url2, https://url3*, https://*.custom_domain.*
Use http=None and/or https=None to disable the usage of a proxy.
To nominate a proxy for a specific scheme and host only, add host.to.proxy= in front of the url of the proxy (the host.to.proxy name must exactly match the host name that should be proxied). You can list several host name = proxy pairs on separate indented lines.
You can still specify a default proxy, without a host, which will be used if none of the host names match. If you do not, then the proxy is disabled for non-matching hosts.
If this fails, you might also try to set environment variables:
# linux/osx $ export HTTP_PROXY="http://10.10.1.10:3128" $ export HTTPS_PROXY="http://10.10.1.10:1080" # with user/password $ export HTTP_PROXY="http://user:firstname.lastname@example.org:3128/" $ export HTTPS_PROXY="http://user:email@example.com:3128/" # windows (note, no quotes here) $ set HTTP_PROXY=http://10.10.1.10:3128 $ set HTTPS_PROXY=http://10.10.1.10:1080