diff --git a/CMakeLists.txt b/CMakeLists.txt index fed866de6..0ed1011d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/doc/sphinx/install.rst b/doc/sphinx/install.rst index 06d0b5c41..ee1cdd2ee 100644 --- a/doc/sphinx/install.rst +++ b/doc/sphinx/install.rst @@ -129,13 +129,20 @@ Conda pagmo is available via the `conda `__ package manager for Linux, OSX and Windows thanks to the infrastructure provided by `conda-forge `__. +Two packages are available: + +* `pagmo `__, which contains the pagmo shared library, +* `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. @@ -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 """""""""" diff --git a/pygmo/CMakeLists.txt b/pygmo/CMakeLists.txt index 6515d3f0f..688468f0a 100644 --- a/pygmo/CMakeLists.txt +++ b/pygmo/CMakeLists.txt @@ -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)