Search code examples
conan

What is the `settings.yml` file in Conan?


I tried reading the documentation but it's not so clear what the goal of this file is. I understand that the Profile defines a set of settings (OS, arch, etc.) used by Conan when a specific client installs packages, but what is the functionality of this settings.yml file?


Solution

  • It's well explained on settings.yml section, on Conan docs.

    To summarize, settings.yml works like a template for Conan. Conan reads that file to validate which settings can be used. If you pass a build_type which is not listed in settings.yml, Conan will consider it invalid and raise an error.

    It keeps a better pattern for all developers, you know everyone is using similar settings, no typo errors for instance. But you can customize your settings, adding new features, like new OS distro.

    But probably you will need to share your settings with your cowokers, as now you have additional values, which is perfectly possible.

    Regards.