File tree Expand file tree Collapse file tree 13 files changed +102
-6
lines changed
Expand file tree Collapse file tree 13 files changed +102
-6
lines changed Original file line number Diff line number Diff line change @@ -8,5 +8,5 @@ dependencies:
88 - eigen
99 - graphviz
1010 - hdf5
11- - xtensor
11+ - xtensor<0.26
1212 - xtl
Original file line number Diff line number Diff line change 1+ channels :
2+ - conda-forge
3+ dependencies :
4+ - boost-cpp
5+ - catch2
6+ - cmake
7+ - doxygen
8+ - eigen
9+ - graphviz
10+ - hdf5
11+ - xtensor>=0.26
12+ - xtl
Original file line number Diff line number Diff line change 1+ channels :
2+ - conda-forge
3+ dependencies :
4+ - boost-cpp
5+ - catch2
6+ - cmake
7+ - doxygen
8+ - eigen
9+ - graphviz
10+ - hdf5
11+ - xtensor<0.26
12+ - xtl
Original file line number Diff line number Diff line change @@ -313,7 +313,15 @@ jobs:
313313 submodules : true
314314
315315 - name : " Install libraries (OSX)"
316- run : brew install boost eigen hdf5 ninja xtensor
316+ run : brew install boost eigen hdf5 ninja
317+
318+ - name : " Install xtensor (OSX)"
319+ if : ${{ matrix.cxxstd == 14 }}
320+ run : brew install "xtensor@0.26"
321+
322+ - name : " Install xtensor (OSX)"
323+ if : ${{ matrix.cxxstd >= 17 }}
324+ run : brew install "xtensor@0.25"
317325
318326 - name : Build
319327 run : |
@@ -358,7 +366,7 @@ jobs:
358366
359367 - uses : mamba-org/setup-micromamba@v2
360368 with :
361- environment-file : .github/mamba_env .yaml
369+ environment-file : .github/mamba_env_cxx${{matrix.cxxstd}} .yaml
362370 environment-name : win-test
363371
364372 - name : Build
Original file line number Diff line number Diff line change @@ -214,6 +214,12 @@ HighFive integrates with the following libraries:
214214- xtensor (optional)
215215- half (optional)
216216
217+ #### XTensor Header Location
218+ XTensor reorganized their headers in version 0.26. HighFive attempts to guess
219+ where the headers can be found. The guessing can be overridded by setting
220+ ` HIGHFIVE_XTENSOR_HEADER_VERSION ` to: ` 1 ` for finding ` xtensor.hpp ` in
221+ ` <xtensor/xtensor.hpp> ` and ` 2 ` for ` <xtensor/containers/xtensor.hpp> ` .
222+
217223## Versioning & Code Stability
218224We use semantic versioning. Currently, we're preparing ` v3 ` which contains a
219225limited set of breaking changes required to eliminate undesireable behaviour or
Original file line number Diff line number Diff line change 2828#endif
2929
3030#ifdef H5_USE_XTENSOR
31- #include < xtensor/xarray.hpp>
32- #include < xtensor/xtensor.hpp>
3331#include " xtensor.hpp"
3432#endif
3533
Original file line number Diff line number Diff line change 1+ #ifndef HIGHFIVE_XTENSOR_HEADER_VERSION
2+ #if __cplusplus >= 201703L
3+ #if __has_include(<xtensor/xtensor.hpp>)
4+ #define HIGHFIVE_XTENSOR_HEADER_VERSION 1
5+ #elif __has_include(<xtensor/containers/xtensor.hpp>)
6+ #define HIGHFIVE_XTENSOR_HEADER_VERSION 2
7+ #else
8+ #error "Unable to guess HIGHFIVE_XTENSOR_HEADER_VERSION. Please set manually."
9+ #endif
10+ #else
11+ #define HIGHFIVE_XTENSOR_HEADER_VERSION 1
12+ #endif
13+ #endif
Original file line number Diff line number Diff line change 22
33#include " bits/H5Inspector_decl.hpp"
44#include " H5Exception.hpp"
5+ #include " bits/xtensor_header_version.hpp"
56
7+ #if HIGHFIVE_XTENSOR_HEADER_VERSION == 1
68#include < xtensor/xtensor.hpp>
79#include < xtensor/xarray.hpp>
810#include < xtensor/xadapt.hpp>
11+ #elif HIGHFIVE_XTENSOR_HEADER_VERSION == 2
12+ #include < xtensor/containers/xtensor.hpp>
13+ #include < xtensor/containers/xarray.hpp>
14+ #include < xtensor/containers/xadapt.hpp>
15+ #else
16+ #error "Set HIGHFIVE_XTENSOR_HEADER_VERSION to `1` for pre 0.26; `2` otherwise."
17+ #endif
918
1019namespace HighFive {
1120namespace details {
Original file line number Diff line number Diff line change 1313
1414// optionally enable plug-in xtensor
1515#ifdef H5_USE_XTENSOR
16+ #include " bits/xtensor_header_version.hpp"
17+ #if HIGHFIVE_XTENSOR_HEADER_VERSION == 1
1618#include < xtensor/xtensor.hpp>
19+ #elif HIGHFIVE_XTENSOR_HEADER_VERSION == 2
20+ #include < xtensor/containers/xtensor.hpp>
21+ #else
22+ #error "Failed to detect HIGHFIVE_XTENSOR_HEADER_VERSION."
23+ #endif
1724#endif
1825
1926// optionally enable plug-in Eigen
Original file line number Diff line number Diff line change 1313
1414// optionally enable plug-in xtensor
1515#ifdef H5_USE_XTENSOR
16+ #include < highfive/bits/xtensor_header_version.hpp>
17+ #if HIGHFIVE_XTENSOR_HEADER_VERSION == 1
1618#include < xtensor/xtensor.hpp>
19+ #elif HIGHFIVE_XTENSOR_HEADER_VERSION == 2
20+ #include < xtensor/containers/xtensor.hpp>
21+ #else
22+ #error "Failed to detect HIGHFIVE_XTENSOR_HEADER_VERSION."
23+ #endif
1724#endif
1825
1926// optionally enable plug-in Eigen
You can’t perform that action at this time.
0 commit comments