From fbedadcdb6456a362f575bf66b655b39b68b6b42 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 07:53:23 -0700 Subject: [PATCH 1/4] Switch to Boost unit test headers --- tests/ndarray-eigen.cc | 3 +-- tests/ndarray-fft.cc | 3 +-- tests/ndarray.cc | 3 +-- tests/views.cc | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/ndarray-eigen.cc b/tests/ndarray-eigen.cc index 7d4785dd..3ee991db 100644 --- a/tests/ndarray-eigen.cc +++ b/tests/ndarray-eigen.cc @@ -11,9 +11,8 @@ #include "ndarray/eigen.h" #include "Eigen/SVD" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray-eigen -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" template void testElements2(T const & a, U const & b) { diff --git a/tests/ndarray-fft.cc b/tests/ndarray-fft.cc index 151f6dcc..beb0aa13 100644 --- a/tests/ndarray-fft.cc +++ b/tests/ndarray-fft.cc @@ -10,9 +10,8 @@ */ #include -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray-fft -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" #include diff --git a/tests/ndarray.cc b/tests/ndarray.cc index 7729e4ad..5f0311b5 100644 --- a/tests/ndarray.cc +++ b/tests/ndarray.cc @@ -10,9 +10,8 @@ */ #include "ndarray.h" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE ndarray -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" BOOST_AUTO_TEST_CASE(sizes) { std::cerr << "sizeof(int): " << sizeof(int) << "\n"; diff --git a/tests/views.cc b/tests/views.cc index 70dfd1c2..11621a4c 100644 --- a/tests/views.cc +++ b/tests/views.cc @@ -10,9 +10,8 @@ */ #include "ndarray.h" -#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE views -#include "boost/test/unit_test.hpp" +#include "boost/test/included/unit_test.hpp" template int templateC(ndarray::ArrayRef const &) { return C; } From 895af532ccbc1f286e117fb9aaf83e18fdbef9a7 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:04:04 -0700 Subject: [PATCH 2/4] Switch to conda-forge --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f55cc76a..608f14ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,8 +22,10 @@ install: - conda update -q conda # Useful for debugging any issues with conda - conda info -a - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 cmake gxx_linux-64 eigen + - conda create -q -n test-environment - source activate test-environment + - conda config --env --add channels conda-forge + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 cmake compilers eigen - export BOOST_DIR=$CONDA_PREFIX - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX From 27bb0bf123090d73d5a224c300330f2104616772 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 08:46:30 -0700 Subject: [PATCH 3/4] Pin pybind11 to 2.2 branch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 608f14ee..f852b10e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ install: - conda create -q -n test-environment - source activate test-environment - conda config --env --add channels conda-forge - - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11 cmake compilers eigen + - conda install python=$TRAVIS_PYTHON_VERSION boost fftw numpy pybind11=2.2.* cmake compilers eigen - export BOOST_DIR=$CONDA_PREFIX - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX From 019620b22f267703763c222ad63b57e643821328 Mon Sep 17 00:00:00 2001 From: Brian Van Klaveren Date: Thu, 18 Jul 2019 14:29:33 -0700 Subject: [PATCH 4/4] Add -lrt for old versions of glibc (conda-forge) --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f852b10e..358813f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,8 @@ install: - export EIGEN_DIR=$CONDA_PREFIX - export FFTW_DIR=$CONDA_PREFIX - export CMAKE_PREFIX_PATH=$CONDA_PREFIX + # For conda-forge's old glibc + - export LDFLAGS="-lrt ${LDFLAGS}" script: - mkdir build