@@ -126,7 +126,7 @@ In order to install pygmo from source, you will need:
126126* `pybind11 <https://github.com/pybind/pybind11 >`__ (version >= 2.6),
127127* the `pagmo C++ library <https://esa.github.io/pagmo2/ >`__,
128128* the `Boost libraries <https://www.boost.org/ >`__,
129- * `CMake <https://cmake.org/ >`__, version 3.8 or later.
129+ * `CMake <https://cmake.org/ >`__, version 3.17 or later.
130130
131131After making sure the dependencies are installed on your system, you can
132132download the pygmo source code from the
@@ -158,51 +158,24 @@ such as:
158158
159159* ``CMAKE_BUILD_TYPE ``: the build type (``Release ``, ``Debug ``, etc.),
160160 defaults to ``Release ``.
161- * ``CMAKE_INSTALL_PREFIX ``: the path into which pygmo will be installed
162- (e.g., this defaults to ``/usr/local `` on Unix-like platforms).
163161* ``CMAKE_PREFIX_PATH ``: additional paths that will be searched by CMake
164162 when looking for dependencies.
163+ * ``PYGMO_INSTALL_PATH ``: the path into which the pygmo module
164+ will be installed. If left empty (the default), pygmo will be installed
165+ in the global modules directory of your Python installation.
166+ * ``PYGMO_ENABLE_IPO ``: set this flag to ``ON `` to compile pygmo
167+ with link-time optimisations. Requires compiler support,
168+ defaults to ``OFF ``.
165169
166170Please consult `CMake's documentation <https://cmake.org/cmake/help/latest/ >`_
167171for more details about CMake's variables and options.
168172
169- A critical setting for a pygmo installation is the
170- value of the ``CMAKE_INSTALL_PREFIX `` variable. The pygmo
171- build system will attempt to construct an appropriate
172- installation path for the Python module by combining
173- the value of ``CMAKE_INSTALL_PREFIX `` with the directory
174- paths of the Python installation in use in a platform-dependent
175- manner.
176-
177- For instance, on a typical Linux installation
178- of Python 3.6,
179- ``CMAKE_INSTALL_PREFIX `` will be set by default to
180- ``/usr/local ``, and the pygmo build system will
181- append ``lib/python3.6/site-packages `` to the install prefix.
182- Thus, the overall install path for the pygmo module will be
183- ``/usr/local/lib/python3.6/site-packages ``. If you want
184- to avoid system-wide installations (which require root
185- privileges), on Unix-like system it is possible to set
186- the ``CMAKE_INSTALL_PREFIX `` variable to the directory
187- ``.local `` in your ``$HOME `` (e.g., ``/home/username/.local ``).
188- The pygmo install path will then be, in this case,
189- ``/home/username/.local/lib/python3.6/site-packages ``,
190- a path which is normally recognised by Python installations
191- without the need to modify the ``PYTHONPATH `` variable.
192- If you install pygmo in non-standard prefixes, you may
193- have to tweak your Python installation in order for the
194- Python interpreter to find the pygmo module.
195-
196- A typical CMake invocation for pygmo may then
197- look something like this:
173+ The ``PYGMO_INSTALL_PATH `` option is particularly important. If you
174+ want to install pygmo locally instead of globally (which is in general
175+ a good idea), you can set this variable to the output of
176+ ``python -m site --user-site ``.
198177
199- .. code-block :: console
200-
201- $ cmake ../ -DCMAKE_INSTALL_PREFIX=~/.local
202-
203- That is, we will be installing pygmo into our home
204- directory into the ``.local ``
205- subdirectory. If CMake runs without errors, we can then proceed to actually
178+ After configuring the build with CMake, we can then proceed to actually
206179building pygmo:
207180
208181.. code-block :: console
0 commit comments