Skip to content

Commit 7c5572d

Browse files
authored
Update CMake variables to new names (#289)
1 parent 4584766 commit 7c5572d

6 files changed

+24
-24
lines changed

pages/docs/dev-docs/dev-tooling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ cmake \
106106
-DCMAKE_CXX_CPPCHECK="cppcheck;--enable=all" \
107107
-DCMAKE_CXX_CPPLINT="cpplint.py" \
108108
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="path/to/iwyu;-p;." \
109-
-DPRECICE_PythonActions=ON \
110-
-DPRECICE_MPICommunication=ON \
111-
-DPRECICE_PETScMapping=ON \
109+
-DPRECICE_FEATURE_PYTHON_ACTIONS=ON \
110+
-DPRECICE_FEATURE_MPI_COMMUNICATION=ON \
111+
-DPRECICE_FEATURE_PETSC_MAPPING=ON \
112112
$PRECICE_ROOT
113113
make -j $(nproc)
114114
```

pages/docs/installation/installation-source-advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ To build preCICE as a static library, you can set `-DBUILD_SHARED_LIBS=OFF`.
3232

3333
The library provides native bindings for C and Fortran.
3434
They are called native as they are compiled into the resulting library.
35-
If you know what you are doing, you can disable them by specifying `-DPRECICE_ENABLE_C=OFF`, or `-DPRECICE_ENABLE_FORTRAN=OFF`.
35+
If you know what you are doing, you can disable them by specifying `-DPRECICE_BINDINGS_C=OFF`, or `-DPRECICE_BINDINGS_FORTRAN=OFF`.
3636

3737
**We highly discourage you to do this, as the resulting binaries will not be compatible with C or Fortran adapters!**
3838

@@ -75,5 +75,5 @@ For using a non-default MPI implementation one can steer the [CMake MPI discover
7575
Example - building with MPICH:
7676

7777
```bash
78-
cmake -DPRECICE_MPICommunication=ON -DMPI_CXX_COMPILER=/usr/bin/mpicxx.mpich ..
78+
cmake -DPRECICE_FEATURE_MPI_COMMUNICATION=ON -DMPI_CXX_COMPILER=/usr/bin/mpicxx.mpich ..
7979
```

pages/docs/installation/installation-source-configuration.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ Assemble your CMake command and run it to configure preCICE.
3939
This example builds the release version of preCICE with the PETSc mapping and the user-defined python actions off, which will be installed in the prefix `~/software/precice`.
4040

4141
```bash
42-
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/software/precice -DPRECICE_PETScMapping=OFF -DPRECICE_PythonActions=OFF ..
42+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/software/precice -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF ..
4343
```
4444

4545
Option | Type | Default | Description
4646
--- | --- | --- | ---
4747
[`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/v3.10/variable/BUILD_SHARED_LIBS.html?highlight=build_shared_libs) | Boolean | ON | Build as a shared library.
4848
[`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/v3.10/variable/CMAKE_BUILD_TYPE.html) | String | `Debug` | Choose Debug, Release, or RelWithDebInfo.
4949
[`CMAKE_INSTALL_PREFIX`](https://cmake.org/cmake/help/v3.10/variable/CMAKE_INSTALL_PREFIX.html) | Path | `/usr/local` | The prefix used in the installation step.
50-
`PRECICE_MPICommunication` | Boolean | ON | Build with MPI.
50+
`PRECICE_FEATURE_MPI_COMMUNICATION` | Boolean | ON | Build with MPI.
5151
[`MPI_CXX_COMPILER`](https://cmake.org/cmake/help/v3.10/module/FindMPI.html#variables-for-locating-mpi) | Path | | MPI compiler wrapper to use for detection.
52-
`PRECICE_PETScMapping` | Boolean | ON | Build with PETSc (for MPI-parallel RBF mapping), requires `PRECICE_MPICommunication=ON`.
53-
`PRECICE_PythonActions` | Boolean | ON | Build support for python actions.
52+
`PRECICE_FEATURE_PETSC_MAPPING` | Boolean | ON | Build with PETSc (for MPI-parallel RBF mapping), requires `PRECICE_FEATURE_MPI_COMMUNICATION=ON`.
53+
`PRECICE_FEATURE_PYTHON_ACTIONS` | Boolean | ON | Build support for python actions.
5454
`PYTHON_EXECUTABLE` | Path | | Path to the python interpreter to use.
5555
[`BUILD_TESTING`](https://cmake.org/cmake/help/v3.10/module/CTest.html#module:CTest) | Boolean | ON | Build and register the tests.
5656
`PRECICE_RELEASE_WITH_ASSERTIONS` | Boolean | OFF | Enables assertions in release builds.
5757
`PRECICE_RELEASE_WITH_DEBUG_LOG` | Boolean | OFF | Enables debug logging in release builds.
5858
`PRECICE_RELEASE_WITH_TRACE_LOG` | Boolean | OFF | Enables trace logging in release builds.
5959
`PRECICE_InstallTest` | Boolean | OFF | Install `testprecice` and test configuration files.
60-
`PRECICE_Packages` | Boolean | ON | Enable package configuration.
61-
`PRECICE_ENABLE_C` | Boolean | ON | Enable the native C bindings.
62-
`PRECICE_ENABLE_FORTRAN` | Boolean | ON | Enable the native Fortran bindings.
60+
`PRECICE_CONFIGURE_PACKAGE_GENERATION` | Boolean | ON | Enable package configuration.
61+
`PRECICE_BINDINGS_C` | Boolean | ON | Enable the native C bindings.
62+
`PRECICE_BINDINGS_FORTRAN` | Boolean | ON | Enable the native Fortran bindings.
6363
`PRECICE_ALWAYS_VALIDATE_LIBS` | Boolean | OFF | Force CMake to always validate required libraries.
6464
`PRECICE_TEST_TIMEOUT_LONG` | Integer | 180 | Timeout for big test suites
6565
`PRECICE_TEST_TIMEOUT_SHORT` | Integer | 20 | Timeout for small test suites

pages/docs/installation/installation-source-dependencies.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Please double check if there are no system packages before attempting to build t
205205
| Required | 3.6 | 3.12 |
206206
| Incompatible | 3.12 | <- |
207207

208-
[PETSc](https://www.mcs.anl.gov/petsc/) is used for RBF mappings and is highly recommended for large cases. For small/medium-size cases, preCICE can still do an RBF mapping in parallel without PETSc. If you don't need this feature, you may specify `-DPRECICE_PETScMapping=off` when building preCICE.
208+
[PETSc](https://www.mcs.anl.gov/petsc/) is used for RBF mappings and is highly recommended for large cases. For small/medium-size cases, preCICE can still do an RBF mapping in parallel without PETSc. If you don't need this feature, you may specify `-DPRECICE_FEATURE_PETSC_MAPPING=off` when building preCICE.
209209

210210
We require at least version 3.12. For preCICE versions earlier than v2.1.0, PETSc version between 3.6 and 3.12 might still work, but needs to be built with 64bit index sizes. In particular on [Ubuntu 18.04, we require at least 3.12](https://github.com/precice/precice/issues/115).
211211

@@ -236,7 +236,7 @@ Finally, in some cases you may need to have PETSc in your `CPATH`, `LIBRARY_PATH
236236
| Required NumPy | | 1.17 |
237237
| Incompatible NumPy | 1.17 | None |
238238

239-
You only need [Python](https://www.python.org/) if you want to use the Python action interface (only used for rare applications). If you don't need this feature, you may specify `-DPRECICE_PythonActions=off`.
239+
You only need [Python](https://www.python.org/) if you want to use the Python action interface (only used for rare applications). If you don't need this feature, you may specify `-DPRECICE_FEATURE_PYTHON_ACTIONS=off`.
240240
In particular, you don't need to build with Python if you only want to use the [preCICE Python bindings](installation-bindings-python.html).
241241

242242
You probably already have Python installed. However, in order to use the Python interface, you also need to install NumPy and the header files for Python and NumPy. On Debian/Ubuntu, install the packages `python3-numpy` and `python3-dev`.
@@ -245,7 +245,7 @@ You probably already have Python installed. However, in order to use the Python
245245

246246
preCICE requires an implementation of the MPI-3 specification, which is provided by all major vendors including OpenMPI, MPICH, and Intel MPI.
247247

248-
You can build preCICE without [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface#Official_implementations) in case of compatibility issues with a certain solver (e.g. a closed source solver with a binary-distributed MPI version, or when running on Windows). To do so, use `-DPRECICE_MPICommunication=OFF` when building with CMake. In such a case, you can still use TCP/IP sockets instead. This might, however, result in lower performance and is, therefore, not recommended if not necessary.
248+
You can build preCICE without [MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface#Official_implementations) in case of compatibility issues with a certain solver (e.g. a closed source solver with a binary-distributed MPI version, or when running on Windows). To do so, use `-DPRECICE_FEATURE_MPI_COMMUNICATION=OFF` when building with CMake. In such a case, you can still use TCP/IP sockets instead. This might, however, result in lower performance and is, therefore, not recommended if not necessary.
249249

250250
Please note that many MPI implementations implement the client-server functionality in various ways.
251251
They often require special setup such as environment variables, servers or infrastructure setup.
@@ -291,7 +291,7 @@ sudo apt update && \
291291
sudo apt install build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev python3-dev python3-numpy
292292
```
293293

294-
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_PETScMapping=OFF`.
294+
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_FEATURE_PETSC_MAPPING=OFF`.
295295
If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
296296

297297
### Debian 11 Bullseye
@@ -314,7 +314,7 @@ apt update && \
314314
apt install build-essential cmake libeigen3-dev libxml2-dev libboost-all-dev python3-dev python3-numpy
315315
```
316316

317-
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_PETScMapping=OFF`.
317+
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_FEATURE_PETSC_MAPPING=OFF`.
318318
If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
319319

320320
### Fedora 36
@@ -340,7 +340,7 @@ module load mpi/openmpi-x86_64
340340
In case you use the docker image of fedora, you need to install the support for environment modules first: `sudo dnf install environment-modules`
341341
{% endnote %}
342342

343-
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_PETScMapping=OFF`. You may need this with older preCICE and Fedora versions (e.g. preCICE v2.1 on Fedora 32 or earlier, see a [related issue](https://github.com/precice/precice/issues/864).
343+
If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc and build with `-DPRECICE_FEATURE_PETSC_MAPPING=OFF`. You may need this with older preCICE and Fedora versions (e.g. preCICE v2.1 on Fedora 32 or earlier, see a [related issue](https://github.com/precice/precice/issues/864).
344344

345345
### Rocky Linux 9
346346

@@ -366,7 +366,7 @@ Rocky Linux very closely follows the conventions previously set by CentOS. We fi
366366
module load mpi/openmpi-x86_64
367367
```
368368

369-
4. Unfortunately, [PETSc does not seem to be available in this distribution.](https://pkgs.org/search/?q=petsc), so we need to switch that off later when building preCICE. If you don't plan to use RBF mappings in large parallel cases, you can continue without installing PETSc and build preCICE with `-DPRECICE_PETScMapping=OFF`. If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
369+
4. Unfortunately, [PETSc does not seem to be available in this distribution.](https://pkgs.org/search/?q=petsc), so we need to switch that off later when building preCICE. If you don't plan to use RBF mappings in large parallel cases, you can continue without installing PETSc and build preCICE with `-DPRECICE_FEATURE_PETSC_MAPPING=OFF`. If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
370370

371371
### CentOS 8
372372

@@ -404,7 +404,7 @@ This system requires to install some tools in a fixed order.
404404
module load mpi/openmpi-x86_64
405405
```
406406

407-
4. Unfortunately, the PETSc package (`petsc-openmpi-devel`) in this distribution is too old. If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc, and build preCICE with `-DPRECICE_PETScMapping=OFF`. If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
407+
4. Unfortunately, the PETSc package (`petsc-openmpi-devel`) in this distribution is too old. If you don't plan to use RBF mappings in large parallel cases you can continue without installing PETSc, and build preCICE with `-DPRECICE_FEATURE_PETSC_MAPPING=OFF`. If you need PETSc, follow the steps in the [PETSc](#petsc) section and you are done.
408408

409409
### CentOS 7
410410

@@ -474,7 +474,7 @@ cmake -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3 <options as usual>
474474
If you don't already have a fitting combination of MPI and PETSc (not shown here), disable the respective features when configuring preCICE:
475475

476476
```bash
477-
cmake -DPRECICE_MPICommunication=OFF -DPRECICE_PETScMapping=OFF <options as usual>
477+
cmake -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF <options as usual>
478478
```
479479

480480
See also a related [discussion on the preCICE forum](https://precice.discourse.group/t/compiling-precice-on-opensuse-leap/1148/4) for more details.

pages/docs/installation/installation-source-troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is also the method of choice when using a [virtual environment](https://doc
2020
Example:
2121

2222
```bash
23-
cmake -DPRECICE_PythonActions=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 .
23+
cmake -DPRECICE_FEATURE_PYTHON_ACTIONS=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.8 .
2424
```
2525

2626
### PETSc could not be found

pages/docs/installation/installation-special-systems.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ libxml2 is part of the `-devel` packages, which are loaded by default on the log
4343
(3) Build preCICE. For PETSc, the library path and include path need to be defined explicitly:
4444

4545
```bash
46-
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="my/install/prefix" -DPRECICE_PETScMapping=ON -DPETSc_INCLUDE_DIRS="$PETSC_DIR/include" -DPETSc_LIBRARIES="$PETSC_DIR/lib/libpetsc.so" -DPRECICE_PythonActions=OFF /path/to/precice/source
46+
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="my/install/prefix" -DPRECICE_FEATURE_PETSC_MAPPING=ON -DPETSc_INCLUDE_DIRS="$PETSC_DIR/include" -DPETSc_LIBRARIES="$PETSC_DIR/lib/libpetsc.so" -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF /path/to/precice/source
4747

4848
make install -j 16
4949
```
@@ -881,6 +881,6 @@ module list
881881

882882
rm -rf build
883883
mkdir -p build && cd build
884-
cmake -DBUILD_SHARED_LIBS=ON -DMPI_CXX_COMPILER=mpigcc -DCMAKE_BUILD_TYPE=Debug -DPRECICE_PythonActions=OFF ..
884+
cmake -DBUILD_SHARED_LIBS=ON -DMPI_CXX_COMPILER=mpigcc -DCMAKE_BUILD_TYPE=Debug -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF ..
885885
make -j
886886
```

0 commit comments

Comments
 (0)