Skip to content
Snippets Groups Projects
Forked from ogs / ogs
8188 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
date = "2018-02-26T11:00:13+01:00"
title = "Conan package manager"
author = "Lars Bilke"
weight = 1033

aliases = ["/docs/devguide/advanced/conan-package-manager"]

[menu]
  [menu.devguide]
    parent = "packages"

Conan {{< dataFile "versions.minimum_version.conan" >}} required

A recent version ({{< dataFile "versions.minimum_version.conan" >}}) of Conan is required! Please update Conan by running pip install --upgrade conan or by downloading the Windows installer.

The Conan package manager helps to install all required libraries in a convenient way on every platform. See Setup pre-requisites for installation instructions. If the Conan executable is found Conan is used for third-party library handling. Set the CMake option OGS_USE_CONAN=OFF to disable Conan.

Advanced usage

Build packages locally

Per default when Conan is enabled it will try to fetch prebuilt binaries from the OGS Conan repository at https://ogs.jfrog.io/ogs/api/conan/conan. With the CMake option OGS_CONAN_BUILD you define what gets build locally. This option can be set to:

  • missing - Default, only builds packages which are not available as a prebuilt binary for the current configuration
  • all - Builds all packages locally
  • never - Builds no package locally
  • [a list of libraries to build], e.g. "petsc;tfel". For names see ConanSetup.cmake. Make sure to set this back to 'never' after the libs have been built. Otherwise it would rebuild the libs on the next CMake run.

Conan environment

Conan creates a runtime environment automatically. When activated this sets environment variables such as PATH or LD_LIBRARY_PATH to point to the used Conan packages. Can be activated in your build directory after CMake ran:

source activate_run.sh
...
source deactivate_run.sh

Further information