Skip to content

Commit

Permalink
Merge pull request #372 from bluescarni/pr/iter
Browse files Browse the repository at this point in the history
Small build/doc updates
  • Loading branch information
bluescarni authored Dec 13, 2019
2 parents 3ef5f38 + f9d148d commit 2f4c936
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,15 @@ if(PAGMO_BUILD_PAGMO)
install(EXPORT pagmo_export NAMESPACE Pagmo:: DESTINATION lib/cmake/pagmo)
# Take care of versioning.
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION}
COMPATIBILITY ExactVersion)
# NOTE: SameMinorVersion available only
# since CMake 3.11.
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION}
COMPATIBILITY SameMajorVersion)
else()
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" VERSION ${pagmo_VERSION}
COMPATIBILITY SameMinorVersion)
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pagmo-config-version.cmake" DESTINATION "lib/cmake/pagmo")
endif()

Expand Down
21 changes: 20 additions & 1 deletion doc/sphinx/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,20 @@ Conda

pagmo is available via the `conda <https://conda.io/docs/>`__ package manager for Linux, OSX and Windows
thanks to the infrastructure provided by `conda-forge <https://conda-forge.org/>`__.
Two packages are available:

* `pagmo <https://anaconda.org/conda-forge/pagmo>`__, which contains the pagmo shared library,
* `pagmo-devel <https://anaconda.org/conda-forge/pagmo-devel>`__,
which contains the pagmo headers and the
CMake support files.

In order to install pagmo via conda, you just need to add ``conda-forge``
to the channels, and then we can immediately install pagmo:

.. code-block:: console
$ conda config --add channels conda-forge
$ conda install pagmo
$ conda install pagmo pagmo-devel
The conda packages for pagmo are maintained by the core development team,
and they are regularly updated when new pagmo versions are released.
Expand Down Expand Up @@ -343,6 +350,18 @@ and they are regularly updated when new pygmo versions are released.
We provide pip packages for Linux and Windows (both Python 2.7 and 3.x),
but **not** for OSX.

.. warning::

It has been reported that the pip packages for Windows
exhibit erratic behaviour (sometimes leading to crashes)
when certain algorithms are used. These issues stem
from incompatibilities between the compiler currently
in use for the production of the pip packages on Windows
(MinGW) and the compiler used to compile Python itself (MSVC).
We are trying to determine if and how these issues can be
resolved. For the time being, users are encouraged to use
the conda packages on Windows instead of the pip packages.

Arch Linux
""""""""""

Expand Down
11 changes: 9 additions & 2 deletions pygmo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/FindNumPy.cmake" "${
"${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/yacma/YACMAPythonSetup.cmake" DESTINATION "lib/cmake/pygmo")
# Take care of versioning.
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION}
COMPATIBILITY ExactVersion)
# NOTE: SameMinorVersion available only
# since CMake 3.11.
if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION}
COMPATIBILITY SameMajorVersion)
else()
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" VERSION ${pygmo_VERSION}
COMPATIBILITY SameMinorVersion)
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pygmo-config-version.cmake" DESTINATION "lib/cmake/pygmo")
install(TARGETS pygmo EXPORT pygmo_export)
install(EXPORT pygmo_export NAMESPACE Pygmo:: DESTINATION lib/cmake/pygmo)
Expand Down

0 comments on commit 2f4c936

Please sign in to comment.