From 37e971f557e78da9ec12bbf7c16abe66b07bed2f Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Thu, 11 Mar 2021 14:24:27 +0100 Subject: [PATCH] [web] Updated Conan usage. --- .../advanced/conan-package-manager.md | 2 +- .../advanced/third-party-libraries.md | 33 ----------------- .../getting-started/build-configuration.md | 6 ---- .../docs/devguide/getting-started/build.md | 2 +- .../devguide/getting-started/prerequisites.md | 35 +++++++++++-------- 5 files changed, 22 insertions(+), 56 deletions(-) delete mode 100644 web/content/docs/devguide/advanced/third-party-libraries.md diff --git a/web/content/docs/devguide/advanced/conan-package-manager.md b/web/content/docs/devguide/advanced/conan-package-manager.md index 2fb442165bb..bbdfae10c91 100644 --- a/web/content/docs/devguide/advanced/conan-package-manager.md +++ b/web/content/docs/devguide/advanced/conan-package-manager.md @@ -27,7 +27,7 @@ Per default when Conan is enabled it will try to fetch prebuilt binaries from th - `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. `"Eigen3;Boost"`. For names see [ConanSetup.cmake](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/scripts/cmake/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. +- `[a list of libraries to build]`, e.g. `"petsc;tfel"`. For names see [ConanSetup.cmake](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/scripts/cmake/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 diff --git a/web/content/docs/devguide/advanced/third-party-libraries.md b/web/content/docs/devguide/advanced/third-party-libraries.md deleted file mode 100644 index eb69260da01..00000000000 --- a/web/content/docs/devguide/advanced/third-party-libraries.md +++ /dev/null @@ -1,33 +0,0 @@ -+++ -date = "2018-02-26T11:00:13+01:00" -title = "Third-party libraries" -author = "Lars Bilke" -weight = 1039 - -[menu] - [menu.devguide] - parent = "advanced" -+++ - -<div class='note'> - -### <i class="far fa-exclamation-triangle"></i> Attention - -We strongly recommend to simply use [Conan]({{< ref "conan.md" >}}) for handling required third-party libraries. -</div> - -## Introduction - -The following libraries are required: - -- [Boost](http://www.boost.org/) >= {{< dataFile "versions.minimum_version.boost" >}} -- [Eigen](http://eigen.tuxfamily.org/) >= {{< dataFile "versions.minimum_version.eigen" >}} -- [VTK](https://www.vtk.org/) >= {{< dataFile "versions.minimum_version.vtk" >}} - -If you want to build the Data Explorer you need these too: - -- [Qt](https://www.qt.io/) >= {{< dataFile "versions.minimum_version.qt" >}} -- [Shapelib](http://shapelib.maptools.org) >= 1.3.0 -- [libgeotiff](https://trac.osgeo.org/geotiff/) >= 1.4.2 - -Please refer to the library documentation on how to build. If you struggle consider using [Conan]({{< ref "conan.md" >}})! Once built CMake tries its best to find the libraries. diff --git a/web/content/docs/devguide/getting-started/build-configuration.md b/web/content/docs/devguide/getting-started/build-configuration.md index 841b6fedbd6..099a90acc1a 100644 --- a/web/content/docs/devguide/getting-started/build-configuration.md +++ b/web/content/docs/devguide/getting-started/build-configuration.md @@ -58,12 +58,6 @@ When you want to start over with a new configuration simply delete the build-dir [See this]({{< ref "configuration-options" >}}) for a list of commonly used available options. -### Note: Installation of required libraries - -It is preferred to use the Conan package manager to install required third-party libraries. If [Conan is installed]({{< ref "prerequisites" >}}#step-install-conan-package-manager) it will automatically download either prebuilt binaries of required libraries or build them locally if a binary for your setup (operating system, compiler, ..) is not available. [Check this]({{< ref "conan-package-manager.md" >}}) for advanced Conan usage. - -Instead of using Conan you can optionally [install the required libraries manually]({{< ref "third-party-libraries.md" >}}) **before** running CMake. - <div class='note'> ### User-defined presets diff --git a/web/content/docs/devguide/getting-started/build.md b/web/content/docs/devguide/getting-started/build.md index 0ef2acf0abb..4b292bd7589 100644 --- a/web/content/docs/devguide/getting-started/build.md +++ b/web/content/docs/devguide/getting-started/build.md @@ -48,7 +48,7 @@ See Linux-tab! ## Waiting -So now the build process is running... This can take some time because maybe there are external libraries which get automatically downloaded and compiled. This step is only done once per build directory, so subsequent builds will be much faster. See [this]({{< ref "third-party-libraries" >}}) for more. +So now the build process is running... This can take some time because maybe there are external libraries which get automatically downloaded and compiled. This step is only done once per build directory, so subsequent builds will be much faster. See [this]({{< ref "cpm.md" >}}) for more. ## Finished diff --git a/web/content/docs/devguide/getting-started/prerequisites.md b/web/content/docs/devguide/getting-started/prerequisites.md index 2c4667ed5cc..df23c5c9ca9 100644 --- a/web/content/docs/devguide/getting-started/prerequisites.md +++ b/web/content/docs/devguide/getting-started/prerequisites.md @@ -17,8 +17,8 @@ The minimum prerequisites to build OGS are: - Git (version control tool, at least version {{< dataFile "versions.minimum_version.git" >}}) - CMake (build configuration tool, at least version {{< dataFile "versions.minimum_version.cmake" >}}) - A compiler with [C++20](http://en.wikipedia.org/wiki/C%2B%2B20)-support -- [Conan package manager](https://www.conan.io/) (at least version {{< dataFile "versions.minimum_version.conan" >}}) **OR** install [required libraries]({{< ref "third-party-libraries.md" >}}) manually (for advanced users only!) - *Optional (but recommended)*: [Ninja](https://ninja-build.org) build tool +- *Optional*: [Conan package manager](https://www.conan.io/) (at least version {{< dataFile "versions.minimum_version.conan" >}}) for some optional dependencies. <div class='note'> @@ -257,9 +257,26 @@ brew install cmake </div> -## Step: Install Conan package manager +## Optional: Install Ninja + +We recommend [`ninja`](https://ninja-build.org) as a cross-platform build tool (`make`-replacement). + +Install Ninja with Python's pip: + +```bash +pip3 install --user ninja +``` + +Make sure that `ninja` is in the path afterwards. See Conan install instructions above. + +## Optional: Install Conan package manager + +You only need Conan if you intend to build with one of the following settings **and** do not want to install their dependencies manually: -The [Conan package manager](https://www.conan.io) helps to install all required libraries in a convenient way on every platform. If you prefer you can also [install libraries manually]({{< ref "third-party-libraries.md" >}}) instead. +- `OGS_USE_PETSC` – For parallel processing, requires PETSc +- `OGS_USE_MFRONT` – MFront material models, requires tfel +- `OGS_BUILD_GUI` – Builds the Data Explorer, requires Qt +- `OGS_USE_NETCDF` – NetCDF IO, requires netcdf-cxx Install Conan (>= {{< dataFile "versions.minimum_version.conan" >}}) with Python's pip: @@ -281,15 +298,3 @@ Conan version {{< dataFile "versions.minimum_version.conan" >}} **Advanced usage:** You can also have Conan auto-installed when using the CMake-option `OGS_USE_CONAN=auto`. See the page on [Python environment]({{< ref "python-env.md" >}}) for details. </div> - -## Optional: Install Ninja - -We recommend [`ninja`](https://ninja-build.org) as a cross-platform build tool (`make`-replacement). - -Install Ninja with Python's pip: - -```bash -pip3 install --user ninja -``` - -Make sure that `ninja` is in the path afterwards. See Conan install instructions above. -- GitLab