Skip to content

Commit

Permalink
Merge pull request #2305 from rcurtin/boost-minimum-version-fix
Browse files Browse the repository at this point in the history
Bump minimum Boost version to 1.58
  • Loading branch information
rcurtin committed Mar 18, 2020
2 parents 7bd128d + a3bb2ec commit 1379831
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 862 deletions.
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,12 @@ if (NOT ENSMALLEN_FOUND)
# Get the name of the directory.
file (GLOB ENS_DIRECTORIES RELATIVE "${CMAKE_BINARY_DIR}/deps/"
"${CMAKE_BINARY_DIR}/deps/ensmallen-[0-9]*.[0-9]*.[0-9]*")
list(FILTER ENS_DIRECTORIES EXCLUDE REGEX "ensmallen-.*\.tar\.gz")
# list(FILTER) is not available on 3.5 or older, but try to keep
# configuring without filtering the list anyway (it might work if only
# the file ensmallen-latest.tar.gz is present.
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.6.0")
list(FILTER ENS_DIRECTORIES EXCLUDE REGEX "ensmallen-.*\.tar\.gz")
endif ()
list(LENGTH ENS_DIRECTORIES ENS_DIRECTORIES_LEN)
if (ENS_DIRECTORIES_LEN EQUAL 1)
list(GET ENS_DIRECTORIES 0 ENSMALLEN_INCLUDE_DIR)
Expand Down Expand Up @@ -408,6 +413,9 @@ endif ()
# Unfortunately this configuration variable is necessary and will need to be
# updated as time goes on and new versions are released.
set(Boost_ADDITIONAL_VERSIONS
"1.72.0" "1.72"
"1.71.0" "1.71"
"1.70.0" "1.70"
"1.69.0" "1.69"
"1.68.0" "1.68"
"1.67.0" "1.67"
Expand All @@ -419,23 +427,14 @@ set(Boost_ADDITIONAL_VERSIONS
"1.61.1" "1.61.0" "1.61"
"1.60.1" "1.60.0" "1.60"
"1.59.1" "1.59.0" "1.59"
"1.58.1" "1.58.0" "1.58"
"1.57.1" "1.57.0" "1.57"
"1.56.1" "1.56.0" "1.56"
"1.55.1" "1.55.0" "1.55"
"1.54.1" "1.54.0" "1.54"
"1.53.1" "1.53.0" "1.53"
"1.52.1" "1.52.0" "1.52"
"1.51.1" "1.51.0" "1.51"
"1.50.1" "1.50.0" "1.50"
"1.49.1" "1.49.0" "1.49")
"1.58.1" "1.58.0" "1.58")
# Disable forced config-mode CMake search for Boost, which only imports targets
# and does not set the variables that we need.
#
# TODO for the brave: transition all mlpack's CMake to 'target-based modern
# CMake'. Good luck! You'll need it.
set(Boost_NO_BOOST_CMAKE 1)
find_package(Boost 1.49
find_package(Boost 1.58
COMPONENTS
program_options
unit_test_framework
Expand Down
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
* Change neural network types to avoid unnecessary use of rvalue references
(#2259).

* Bump minimum Boost version to 1.58 (#2305).

### mlpack 3.2.2
###### 2019-11-26
* Add `valid` and `same` padding option in `Convolution` and `Atrous
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ Citations are beneficial for the growth and improvement of mlpack.

mlpack has the following dependencies:

Armadillo >= 8.400.0
Armadillo >= 8.400.0
Boost (program_options, math_c99, unit_test_framework, serialization,
spirit)
CMake >= 3.3.2
ensmallen >= 2.10.0
spirit) >= 1.58.0
CMake >= 3.3.2
ensmallen >= 2.10.0

All of those should be available in your distribution's package manager. If
not, you will have to compile each of them by hand. See the documentation for
Expand Down
2 changes: 1 addition & 1 deletion doc/guide/build.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ system and have headers present:
- Armadillo >= 8.400.0 (with LAPACK support)
- Boost (math_c99, program_options, serialization, unit_test_framework, heap,
spirit) >= 1.49
spirit) >= 1.58
- ensmallen >= 2.10.0 (will be downloaded if not found)
In addition, mlpack has the following optional dependencies:
Expand Down
4 changes: 0 additions & 4 deletions src/mlpack/core/boost_backport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
# Anything not in this list will not be compiled into mlpack.
set(SOURCES
bernoulli.hpp
boost_backport_math.hpp
boost_backport_serialization.hpp
detail/bernoulli_details.hpp
detail/polygamma.hpp
detail/unchecked_bernoulli.hpp
math_fwd.hpp
policy.hpp
polygamma.hpp
trigamma.hpp
unordered_collections_load_imp.hpp
unordered_collections_save_imp.hpp
unordered_map.hpp
vector.hpp
string_view.hpp
string_view_fwd.hpp
Expand Down
29 changes: 0 additions & 29 deletions src/mlpack/core/boost_backport/boost_backport_math.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@
#define MLPACK_CORE_BOOST_BACKPORT_SERIALIZATION_HPP

#include <boost/version.hpp>

#if BOOST_VERSION < 105600
// Backported unordered_map.
#include "mlpack/core/boost_backport/unordered_map.hpp"
#else
// Boost's version.
#include <boost/serialization/unordered_map.hpp>
#endif
#include <boost/serialization/unordered_map.hpp>

#if BOOST_VERSION == 105800
/**
Expand Down
94 changes: 0 additions & 94 deletions src/mlpack/core/boost_backport/polygamma.hpp

This file was deleted.

Loading

0 comments on commit 1379831

Please sign in to comment.